From 855f04a927526445b72224c530603839ab610ac5 Mon Sep 17 00:00:00 2001 From: tl Date: Fri, 11 Oct 2024 12:17:40 +0800 Subject: [PATCH] cherry pick 72227cd from https://gitee.com/tlbl/kernel_linux_5.10/pulls/1639 test truncate Signed-off-by: tl --- fs/sharefs/inode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/sharefs/inode.c b/fs/sharefs/inode.c index 23d8530e8595..4d6c3c3aa607 100644 --- a/fs/sharefs/inode.c +++ b/fs/sharefs/inode.c @@ -308,6 +308,7 @@ static int sharefs_rename(struct inode *old_dir, struct dentry *old_dentry, sharefs_put_lower_path(new_dentry, &lower_new_path); return err; } +#endif static int sharefs_setattr(struct dentry *dentry, struct iattr *ia) { @@ -388,7 +389,6 @@ static int sharefs_setattr(struct dentry *dentry, struct iattr *ia) out_err: return err; } -#endif const struct inode_operations sharefs_symlink_iops = { .permission = sharefs_permission, @@ -408,15 +408,13 @@ const struct inode_operations sharefs_dir_iops = { .rename = sharefs_rename, .create = sharefs_create, .mkdir = sharefs_mkdir, - .setattr = sharefs_setattr, #endif + .setattr = sharefs_setattr, }; const struct inode_operations sharefs_main_iops = { .permission = sharefs_permission, .getattr = sharefs_getattr, .listxattr = sharefs_listxattr, -#ifdef CONFIG_SHAREFS_SUPPORT_WRITE .setattr = sharefs_setattr, -#endif }; -- Gitee