From: Harry Austen <harryausten@hotmail.co.uk>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: jaegeuk@kernel.org, chao@kernel.org,
linux-kernel@vger.kernel.org,
Harry Austen <harryausten@hotmail.co.uk>
Subject: [PATCH] f2fs: fix fileattr_set unsupported attribute handling
Date: Sat, 22 Jan 2022 12:59:03 +0000 [thread overview]
Message-ID: <AM6PR10MB2838873D61CE1C0DB91EEDB9FA5C9@AM6PR10MB2838.EURPRD10.PROD.OUTLOOK.COM> (raw)
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@hotmail.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
next reply other threads:[~2022-01-22 13:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-22 12:59 Harry Austen [this message]
2022-01-23 8:52 ` Chao Yu
2022-01-24 19:25 ` [f2fs-dev] " Eric Biggers
2022-01-25 22:01 ` Harry Austen
2022-01-25 22:13 ` Eric Biggers
2022-01-30 2:43 ` [f2fs] 9ec9c5043d: xfstests.generic.386.fail kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM6PR10MB2838873D61CE1C0DB91EEDB9FA5C9@AM6PR10MB2838.EURPRD10.PROD.OUTLOOK.COM \
--to=harryausten@hotmail.co.uk \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®