Message ID | 20240620032335.147136-1-youling.tang@linux.dev (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/3] fs: Export in_group_or_capable() | expand |
On Thu, 20 Jun 2024 11:23:33 +0800, Youling Tang wrote: > Export in_group_or_capable() as a VFS helper function. > > This makes sense to me. --- Applied to the vfs.misc branch of the vfs/vfs.git tree. Patches in the vfs.misc branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.misc [1/3] fs: Export in_group_or_capable() https://git.kernel.org/vfs/vfs/c/daf0f1ce3585 [2/3] f2fs: Use in_group_or_capable() helper https://git.kernel.org/vfs/vfs/c/29a76d8b349b [3/3] fuse: Use in_group_or_capable() helper https://git.kernel.org/vfs/vfs/c/d128e6b878ac
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Christian Brauner <brauner@kernel.org>: On Thu, 20 Jun 2024 11:23:33 +0800 you wrote: > From: Youling Tang <tangyouling@kylinos.cn> > > Export in_group_or_capable() as a VFS helper function. > > Signed-off-by: Youling Tang <tangyouling@kylinos.cn> > --- > fs/attr.c | 2 -- > fs/inode.c | 1 + > include/linux/fs.h | 2 ++ > 3 files changed, 3 insertions(+), 2 deletions(-) Here is the summary with links: - [f2fs-dev,1/3] fs: Export in_group_or_capable() https://git.kernel.org/jaegeuk/f2fs/c/9b6a14f08b48 - [f2fs-dev,2/3] f2fs: Use in_group_or_capable() helper https://git.kernel.org/jaegeuk/f2fs/c/8444ee22adb0 - [f2fs-dev,3/3] fuse: Use in_group_or_capable() helper https://git.kernel.org/jaegeuk/f2fs/c/153216cf7bd5 You are awesome, thank you!
diff --git a/fs/attr.c b/fs/attr.c index 960a310581eb..825007d5cda4 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -17,8 +17,6 @@ #include <linux/filelock.h> #include <linux/security.h> -#include "internal.h" - /** * setattr_should_drop_sgid - determine whether the setgid bit needs to be * removed diff --git a/fs/inode.c b/fs/inode.c index 3a41f83a4ba5..e0815acc5abb 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -2538,6 +2538,7 @@ bool in_group_or_capable(struct mnt_idmap *idmap, return true; return false; } +EXPORT_SYMBOL(in_group_or_capable); /** * mode_strip_sgid - handle the sgid bit for non-directories diff --git a/include/linux/fs.h b/include/linux/fs.h index 0283cf366c2a..c375a4af7b11 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1926,6 +1926,8 @@ void inode_init_owner(struct mnt_idmap *idmap, struct inode *inode, extern bool may_open_dev(const struct path *path); umode_t mode_strip_sgid(struct mnt_idmap *idmap, const struct inode *dir, umode_t mode); +bool in_group_or_capable(struct mnt_idmap *idmap, + const struct inode *inode, vfsgid_t vfsgid); /* * This is the "filldir" function type, used by readdir() to let