[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR10MB2838873D61CE1C0DB91EEDB9FA5C9@AM6PR10MB2838.EURPRD10.PROD.OUTLOOK.COM>
Date: Sat, 22 Jan 2022 12:59:03 +0000
From: Harry Austen <harryausten@...mail.co.uk>
To: linux-f2fs-devel@...ts.sourceforge.net
Cc: jaegeuk@...nel.org, chao@...nel.org, linux-kernel@...r.kernel.org,
Harry Austen <harryausten@...mail.co.uk>
Subject: [PATCH] f2fs: fix fileattr_set unsupported attribute handling
FS_IOC_SETFLAGS ioctl should return EOPNOTSUPP if the file attribute
(e.g. FS_NOCOW_FL) is not supported, rather than silently ignoring it
and returning success.
Fixes: 9b1bb01c8ae7 (f2fs: convert to fileattr)
Signed-off-by: Harry Austen <harryausten@...mail.co.uk>
---
fs/f2fs/file.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 92ec2699bc85..061bf35c2582 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3085,9 +3085,8 @@ int f2fs_fileattr_set(struct user_namespace *mnt_userns,
return -EIO;
if (!f2fs_is_checkpoint_ready(F2FS_I_SB(inode)))
return -ENOSPC;
- if (fsflags & ~F2FS_GETTABLE_FS_FL)
+ if (fsflags & ~F2FS_SETTABLE_FS_FL)
return -EOPNOTSUPP;
- fsflags &= F2FS_SETTABLE_FS_FL;
if (!fa->flags_valid)
mask &= FS_COMMON_FL;
--
2.34.1
Powered by blists - more mailing lists