this patchset was motivated by new warnings with make htmldocs appearing on
linux-next in the last week.
Please apply this on top of your latest work in fs on top of the mount user
namespace refactoring, cf. the commits referred in the individual commit
messages.
Lukas Bulwahn (5):
fs: turn some comments into kernel-doc
fs: update kernel-doc for vfs_rename()
fs: update kernel-doc for may_create_in_sticky()
fs: update kernel-doc for vfs_tmpfile()
fs: update kernel-doc for new mnt_userns argument
fs/libfs.c | 1 +
fs/namei.c | 13 ++-----------
fs/xattr.c | 2 ++
include/linux/fs.h | 17 ++++++++++++++---
4 files changed, 19 insertions(+), 14 deletions(-)
--
2.17.1
Commit ba73d98745be ("namei: handle idmapped mounts in may_*() helpers")
refactors may_create_in_sticky(), adds kernel-doc for the new argument,
but missed to drop the kernel-doc for the removed arguments.
Hence, make htmldocs warns on ./fs/namei.c:1149:
warning: Excess function parameter 'dir_mode' description in 'may_create_in_sticky'
warning: Excess function parameter 'dir_uid' description in 'may_create_in_sticky'
Drop removed arguments from kernel-doc of may_create_in_sticky().
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
fs/namei.c | 2 --
1 file changed, 2 deletions(-)
Commit 6521f8917082 ("namei: prepare for idmapped mounts") adds kernel-doc
for vfs_tmpfile(), but with a small typo in one argument name.
Hence, make htmldocs warns on ./fs/namei.c:3396:
warning: Function parameter or member 'open_flag' not described in 'vfs_tmpfile'
warning: Excess function parameter 'open_flags' description in 'vfs_tmpfile'
Fix this typo in kernel-doc of vfs_tmpfile().
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
fs/namei.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Commit 9fe61450972d ("namei: introduce struct renamedata") introduces a
new struct for vfs_rename() and makes the vfs_rename() kernel-doc argument
description out of sync.
Move the description of arguments for vfs_rename() to a new kernel-doc for
the struct renamedata to make these descriptions checkable against the
actual implementation.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
fs/namei.c | 9 +--------
include/linux/fs.h | 11 +++++++++++
2 files changed, 12 insertions(+), 8 deletions(-)
Commit 549c7297717c ("fs: make helpers idmap mount aware") and commit
c7c7a1a18af4 ("xattr: handle idmapped mounts") refactor the inode methods
with mount-user-namespace arguments, but did not adjust the kernel-doc of
some functions.
Hence, make htmldocs warns:
./fs/libfs.c:498: warning: Function parameter or member 'mnt_userns' not described in 'simple_setattr'
./fs/xattr.c:257: warning: Function parameter or member 'mnt_userns' not described in '__vfs_setxattr_locked'
./fs/xattr.c:485: warning: Function parameter or member 'mnt_userns' not described in '__vfs_removexattr_locked'
Copy the existing kernel-doc description for that new argument from
__vfs_setxattr_noperm() to the other functions as well.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
fs/libfs.c | 1 +
fs/xattr.c | 2 ++
2 files changed, 3 insertions(+)
While reviewing ./include/linux/fs.h, I noticed that three comments can
actually be turned into kernel-doc comments. This allows to check the
consistency between the descriptions and the functions' signatures in
case they may change in the future.
A quick validation with the consistency check:
./scripts/kernel-doc -none include/linux/fs.h
currently reports no issues in this file.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
include/linux/fs.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
From: Christian Brauner <hidden> Date: 2021-03-01 12:53:01
On Thu, Feb 04, 2021 at 07:00:54PM +0100, Lukas Bulwahn wrote:
this patchset was motivated by new warnings with make htmldocs appearing on
linux-next in the last week.
Please apply this on top of your latest work in fs on top of the mount user
namespace refactoring, cf. the commits referred in the individual commit
messages.
Lukas Bulwahn (5):
fs: turn some comments into kernel-doc
fs: update kernel-doc for vfs_rename()
fs: update kernel-doc for may_create_in_sticky()
fs: update kernel-doc for vfs_tmpfile()
fs: update kernel-doc for new mnt_userns argument
fs/libfs.c | 1 +
fs/namei.c | 13 ++-----------
fs/xattr.c | 2 ++
include/linux/fs.h | 17 ++++++++++++++---
4 files changed, 19 insertions(+), 14 deletions(-)
Thanks for fixing this up, Lukas. Randy has fixed some of my missing
comment updates as well so we only needed
fs: turn some comments into kernel-doc
fs: update kernel-doc for vfs_rename()