mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Task: Extra credit : LKMP Bug Fixing 2024 Spring : Documentation
@ 2024-02-03 13:07 Abhinav Jain
  2024-02-03 17:31 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Abhinav Jain @ 2024-02-03 13:07 UTC (permalink / raw)
  To: skhan; +Cc: linux-kernel, Abhinav Jain

Added a prototype for dget() to fix the warning

Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
---
 include/linux/dcache.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 3da2f0545d5d..b082b48e7eb5 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -301,7 +301,7 @@ extern char *dentry_path(const struct dentry *, char *, int);
 /* 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
@@ -315,6 +315,13 @@ static inline struct dentry *dget_dlock(struct dentry *dentry)
 	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
+ *	unconditionally and return it.
+ */
 static inline struct dentry *dget(struct dentry *dentry)
 {
 	if (dentry)
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Task: Extra credit : LKMP Bug Fixing 2024 Spring : Documentation
  2024-02-03 13:07 [PATCH] Task: Extra credit : LKMP Bug Fixing 2024 Spring : Documentation Abhinav Jain
@ 2024-02-03 17:31 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2024-02-03 17:31 UTC (permalink / raw)
  To: Abhinav Jain, skhan; +Cc: linux-kernel

Hi--

On 2/3/24 05:07, Abhinav Jain wrote:
> Added a prototype for dget() to fix the warning
> 
> Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
> ---
>  include/linux/dcache.h | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/dcache.h b/include/linux/dcache.h
> index 3da2f0545d5d..b082b48e7eb5 100644
> --- a/include/linux/dcache.h
> +++ b/include/linux/dcache.h
> @@ -301,7 +301,7 @@ extern char *dentry_path(const struct dentry *, char *, int);
>  /* 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
> @@ -315,6 +315,13 @@ static inline struct dentry *dget_dlock(struct dentry *dentry)
>  	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
> + *	unconditionally and return it.
> + */
>  static inline struct dentry *dget(struct dentry *dentry)
>  {
>  	if (dentry)

The function documentation now makes it look like these functions do the
same thing, so why have both of them -- or am I misreading it?

Anyway, this problem is already fixed in the linux-next tree (more specifically
in the vfs tree).

Thanks.
-- 
#Randy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-03 17:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-03 13:07 [PATCH] Task: Extra credit : LKMP Bug Fixing 2024 Spring : Documentation Abhinav Jain
2024-02-03 17:31 ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®