From: Marios Makassikis mmakassikis@freebox.fr
mainline inclusion from mainline-5.15-rc1 commit 7adfd4f6f78eb1c2561bcfdc20f7cc39f2d89437 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I60T7G CVE: NA
Reference: https://git.kernel.org/torvalds/linux/c/7adfd4f6f78e
-------------------------------
Inline it in the only place it is used and remove it.
Signed-off-by: Marios Makassikis mmakassikis@freebox.fr Signed-off-by: Namjae Jeon namjae.jeon@samsung.com Signed-off-by: Steve French stfrench@microsoft.com Signed-off-by: Jason Yan yanaijie@huawei.com Signed-off-by: Zhong Jinghua zhongjinghua@huawei.com --- fs/cifsd/smb2pdu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/cifsd/smb2pdu.c b/fs/cifsd/smb2pdu.c index 73c6154170cf..eeb3f09e8765 100644 --- a/fs/cifsd/smb2pdu.c +++ b/fs/cifsd/smb2pdu.c @@ -5237,11 +5237,6 @@ static int smb2_create_link(struct ksmbd_work *work, return rc; }
-static bool is_attributes_write_allowed(struct ksmbd_file *fp) -{ - return fp->daccess & FILE_WRITE_ATTRIBUTES_LE; -} - static int set_file_basic_info(struct ksmbd_file *fp, char *buf, struct ksmbd_share_config *share) { @@ -5252,7 +5247,7 @@ static int set_file_basic_info(struct ksmbd_file *fp, char *buf, struct inode *inode; int rc;
- if (!is_attributes_write_allowed(fp)) + if (!(fp->daccess & FILE_WRITE_ATTRIBUTES_LE)) return -EACCES;
file_info = (struct smb2_file_all_info *)buf;