summaryrefslogtreecommitdiff
path: root/Documentation/kref.txt
AgeCommit message (Collapse)AuthorFilesLines
2020-05-15docs: move the kref doc into the core-api bookMauro Carvalho Chehab1-323/+0
This document covers core kernel objects. So, add it into the core-api book. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/f385af13b4a6d3ff8c89beedd4506900e79ca72e.1588345503.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2020-02-25docs: kref: Clarify the use of two kref_put() in example codeManivannan Sadhasivam1-0/+4
Eventhough the current documentation explains that the reference count gets incremented by both kref_init() and kref_get(), it is often misunderstood that only one instance of kref_put() is needed in the example code. So let's clarify that a bit. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-07-14kref.txt: standardize document formatMauro Carvalho Chehab1-140/+155
Each text file under Documentation follows a different format. Some doesn't even have titles! Change its representation to follow the adopted standard, using ReST markups for it to be parseable by Sphinx: - add a title for the document and section titles; - move authorship information to the beginning and use :Author: - mark literal blocks as such and ident them if needed. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-04-08Revert "kref: double kref_put() in my_data_handler()"Thomas Hellstrom1-0/+1
This reverts commit 8f1ecc9fbc5b223e4f5d5bb8bcd6f5672c4bc4b6. The correction is incorrect, see discussion at http://stackoverflow.com/questions/20093127/why-kref-doc-of-linux-kernel-omits-kref-put-when-kthread-run-fail Reported-by: KrishnamRaju raju <ekraju@gmail.com> Cc: Roel Kluin <roel.kluin@gmail.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: KrishnamRaju raju <ekraju@gmail.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-28kref: Add kref_get_unless_zero documentationThomas Hellstrom1-0/+88
Document how kref_get_unless_zero should be used and how it helps solve a typical kref / locking problem. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-08kref: Fix typo in kref documentationJavi Merino1-1/+1
container_of() should refer to the struct created in the example. Signed-off-by: Javi Merino <cibervicho@gmail.com> Cc: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-18kref: double kref_put() in my_data_handler()Roel Kluin1-1/+0
The kref_put() already occurs after the out label Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06docs: convert kref semaphore to mutexDaniel Walker1-10/+10
Just converting this documentation semaphore reference, since we don't want to promote semaphore usage. Signed-off-by: Daniel Walker <dwalker@mvista.com> Acked-by: Corey Minyard <minyard@acm.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-11Fix wrong identifier name in Documentation/kref.txtSatyam Sharma1-1/+1
There's a typo / wrong identifier name in Documentation/kref.txt. Fix it. Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in> Acked-by: Corey Minyard <minyard@acm.org> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2005-04-19[PATCH] kref: add link to original documentation to the kref documentation.gregkh@suse.de1-1/+6
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-04-19[PATCH] kref: add documentationminyard@acm.org1-0/+211
Add some documentation for krefs. Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>