From: Randy Dunlap Subject: [PATCH] fs: dcache: fix dget()/dget_dlock() kernel-doc Separate the kernel-doc notation for dget() and dget_dlock() to prevent a kernel-doc warning: include/linux/dcache.h:312: warning: expecting prototype for dget, dget_dlock(). Prototype was for dget_dlock() instead Fixes: dc0474be3e27 ("fs: dcache rationalise dget variants") Signed-off-by: Randy Dunlap Cc: Alexander Viro Cc: Christian Brauner Cc: Nicholas Piggin Cc: linux-fsdevel@vger.kernel.org --- It would be good for the comments to explain the difference(s) in these 2 functions. If someone could add that or just suggest what it should say, I can update the patch. Thank you. It appears to be something like: dget() is used for the initial lockref on a dentry. dget_dlock() is used to increment the lockref count after the initial lockref is made. include/linux/dcache.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff -- a/include/linux/dcache.h b/include/linux/dcache.h --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -301,11 +301,11 @@ extern char *dentry_path(const struct de /* Allocation counts.. */ /** - * dget, dget_dlock - get a reference to a dentry + * dget_dlock - get a reference to a dentry * @dentry: dentry to get a reference to * * Given a dentry or %NULL pointer increment the reference count - * if appropriate and return the dentry. A dentry will not be + * if appropriate and return the dentry. A dentry will not be * destroyed when it has references. */ static inline struct dentry *dget_dlock(struct dentry *dentry) @@ -315,6 +315,14 @@ static inline struct dentry *dget_dlock( return dentry; } +/** + * dget - get a reference to a dentry + * @dentry: dentry to get a reference to + * + * Given a dentry or %NULL pointer increment the reference count + * if appropriate and return the dentry. A dentry will not be + * destroyed when it has references. + */ static inline struct dentry *dget(struct dentry *dentry) { if (dentry)