f2fs: fix to return -EOPNOTSUPP for uncached write
Chao Yu
maintainerPATCH 1/1 f2fs: fix to return -EOPNOTSUPP for uncached write
f2fs doesn't support uncached write yet, for write() w/ IOCB_DONTCACHE flag, let's return -EOPNOTSUPP instead of ignoring IOCB_DONTCACHE flag and write w/o uncached IO.
---
v2:
- fix author info
fs/f2fs/file.c | 5 +++++ 1 file changed, 5 insertions(+)
fs/f2fs/file.c +5 -0
@@ -5185,6 +5185,11 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) goto out; } +if (iocb->ki_flags &IOCB_DONTCACHE ) { + ret = -EOPNOTSUPP ; + goto out; + } +if (!f2fs_is_compress_backend_ready (inode)) { ret = -EOPNOTSUPP ; goto out;
Signature · 1 line
2.49.0
Quoted 3 lines
f2fs doesn't support uncached write yet, for
write()w/IOCB_DONTCACHEflag, let's return-EOPNOTSUPPinstead of ignoringIOCB_DONTCACHEflag and write w/o uncached IO.
See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.16#n94
…
Quoted 2 lines
---
v2:
…
Should a corresponding information appear in the patch subject?
…
fs/f2fs/file.c static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) · line 5195
Quoted 13 lines
+++
b/fs/f2fs/file.cfs/f2fs/file.c +5
-0@@ -5185,6 +5185,11 @@ static ssize_t f2fs_file_write_iter(struct kiocb *iocb, struct iov_iter *from) goto out; } +if (iocb->ki_flags &IOCB_DONTCACHE ) { + ret = -EOPNOTSUPP ; + goto out; + } +if (!f2fs_is_compress_backend_ready (inode)) { ret = -EOPNOTSUPP ; goto out;
Can it be avoided to specify duplicate exception handling? May the condition checks be merged for these if statements?
Regards,
Markus