mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] gfs2: Fix the return value in gfs2_get_link() kernel-doc
@ 2026-09-12  6:26 Karl Mehltretter
  2026-09-12 13:41 ` Andreas Gruenbacher
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Mehltretter @ 2026-09-12  6:26 UTC (permalink / raw)
  To: Andreas Gruenbacher; +Cc: Karl Mehltretter, Al Viro, gfs2, linux-kernel

gfs2_get_link() returns the link target or an error pointer, but its
kernel-doc still describes an integer status. The mismatch dates back to
the change in its predecessor's follow_link calling convention.

Describe the returned pointer and error value.

Fixes: 680baacbca69 ("new ->follow_link() and ->put_link() calling conventions")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
 fs/gfs2/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index f361876c5583353a1196ed35be1c95af33a90c02..d5e03ec89127254654dceaff56322ed617a3400a 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -1900,7 +1900,7 @@ static int gfs2_rename2(struct mnt_idmap *idmap, struct inode *odir,
  *
  * This can handle symlinks of any size.
  *
- * Returns: 0 on success or error code
+ * Returns: the link target on success, an ERR_PTR() on failure
  */
 
 static const char *gfs2_get_link(struct dentry *dentry,
-- 
2.39.5 (Apple Git-154)


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

* Re: [PATCH] gfs2: Fix the return value in gfs2_get_link() kernel-doc
  2026-09-12  6:26 [PATCH] gfs2: Fix the return value in gfs2_get_link() kernel-doc Karl Mehltretter
@ 2026-09-12 13:41 ` Andreas Gruenbacher
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Gruenbacher @ 2026-09-12 13:41 UTC (permalink / raw)
  To: Karl Mehltretter; +Cc: Al Viro, gfs2, linux-kernel

On Sat, Sep 12, 2026 at 8:26 AM Karl Mehltretter <kmehltretter@gmail.com> wrote:
> gfs2_get_link() returns the link target or an error pointer, but its
> kernel-doc still describes an integer status. The mismatch dates back to
> the change in its predecessor's follow_link calling convention.
>
> Describe the returned pointer and error value.
>
> Fixes: 680baacbca69 ("new ->follow_link() and ->put_link() calling conventions")

Actually, the problem was introduced in commit c177c2ac8c5a ("Switch
gfs2 to nd_set_link()"). I've updated the description and applied the
patch to for-next.

Thanks,
Andreas

> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
> ---
>  fs/gfs2/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
> index f361876c5583353a1196ed35be1c95af33a90c02..d5e03ec89127254654dceaff56322ed617a3400a 100644
> --- a/fs/gfs2/inode.c
> +++ b/fs/gfs2/inode.c
> @@ -1900,7 +1900,7 @@ static int gfs2_rename2(struct mnt_idmap *idmap, struct inode *odir,
>   *
>   * This can handle symlinks of any size.
>   *
> - * Returns: 0 on success or error code
> + * Returns: the link target on success, an ERR_PTR() on failure
>   */
>
>  static const char *gfs2_get_link(struct dentry *dentry,
> --
> 2.39.5 (Apple Git-154)
>


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

end of thread, other threads:[~2026-09-12 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-12  6:26 [PATCH] gfs2: Fix the return value in gfs2_get_link() kernel-doc Karl Mehltretter
2026-09-12 13:41 ` Andreas Gruenbacher

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®