From f5eee338151fbcfeb3491e167488efe78381ad39 Mon Sep 17 00:00:00 2001 From: zhangkaixiang Date: Tue, 14 Feb 2023 13:19:25 +0800 Subject: [PATCH] fix the bug of bid Signed-off-by: zhangkaixiang --- fs/sharefs/authentication.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/sharefs/authentication.c b/fs/sharefs/authentication.c index 57756e479fea..71bd2d7275fd 100644 --- a/fs/sharefs/authentication.c +++ b/fs/sharefs/authentication.c @@ -24,6 +24,7 @@ void fixup_perm_from_level(struct inode *dir, struct dentry *dentry) const unsigned char* cur_name = dentry->d_name.name; __u16 level = perm_get_next_level(hii->perm); __u16 perm = 0; + int bid = 0; if (IS_ERR_OR_NULL(dinode)) return; @@ -32,7 +33,7 @@ void fixup_perm_from_level(struct inode *dir, struct dentry *dentry) switch (level) { case SHAREFS_PERM_MNT: - int bid = get_bundle_uid(SHAREFS_SB(dentry->d_sb), + bid = get_bundle_uid(SHAREFS_SB(dentry->d_sb), dentry->d_name.name); perm = level; if (bid != 0) { -- Gitee