* Re: [PATCH] fs/ntfs3: check for shutdown in fsync [not found] <20251118130705.411336-1-almaz.alexandrovich@paragon-software.com> @ 2025-11-19 2:51 ` kernel test robot 2025-11-19 9:10 ` [PATCH v2] " Konstantin Komarov 0 siblings, 1 reply; 2+ messages in thread From: kernel test robot @ 2025-11-19 2:51 UTC (permalink / raw) To: Konstantin Komarov, ntfs3 Cc: llvm, oe-kbuild-all, linux-kernel, linux-fsdevel, Konstantin Komarov Hi Konstantin, kernel test robot noticed the following build warnings: [auto build test WARNING on brauner-vfs/vfs.all] [also build test WARNING on linus/master v6.18-rc6 next-20251118] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Konstantin-Komarov/fs-ntfs3-check-for-shutdown-in-fsync/20251118-210835 base: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all patch link: https://lore.kernel.org/r/20251118130705.411336-1-almaz.alexandrovich%40paragon-software.com patch subject: [PATCH] fs/ntfs3: check for shutdown in fsync config: i386-buildonly-randconfig-004-20251119 (https://download.01.org/0day-ci/archive/20251119/202511191004.GdiCxONs-lkp@intel.com/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251119/202511191004.GdiCxONs-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202511191004.GdiCxONs-lkp@intel.com/ All warnings (new ones prefixed by >>): >> fs/ntfs3/file.c:1381:5: warning: no previous prototype for function 'ntfs_file_fsync' [-Wmissing-prototypes] 1381 | int ntfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) | ^ fs/ntfs3/file.c:1381:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1381 | int ntfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) | ^ | static fs/ntfs3/file.c:1415:12: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] 1415 | .fsync = ntfs_file_fsync, | ^~~~~~~~~~~~~~~ fs/ntfs3/file.c:1412:12: note: previous initialization is here 1412 | .fsync = generic_file_fsync, | ^~~~~~~~~~~~~~~~~~ 2 warnings generated. vim +/ntfs_file_fsync +1381 fs/ntfs3/file.c 1377 1378 /* 1379 * ntfs_file_fsync - file_operations::fsync 1380 */ > 1381 int ntfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) 1382 { 1383 struct inode *inode = file_inode(file); 1384 if (unlikely(ntfs3_forced_shutdown(inode->i_sb))) 1385 return -EIO; 1386 1387 return generic_file_fsync(file, start, end, datasync); 1388 } 1389 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v2] fs/ntfs3: check for shutdown in fsync 2025-11-19 2:51 ` [PATCH] fs/ntfs3: check for shutdown in fsync kernel test robot @ 2025-11-19 9:10 ` Konstantin Komarov 0 siblings, 0 replies; 2+ messages in thread From: Konstantin Komarov @ 2025-11-19 9:10 UTC (permalink / raw) To: ntfs3 Cc: linux-kernel, linux-fsdevel, lkp, llvm, oe-kbuild-all, Konstantin Komarov Ensure fsync() returns -EIO when the ntfs3 filesystem is in forced shutdown, instead of silently succeeding via generic_file_fsync(). Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> --- fs/ntfs3/file.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c index 3b22c7375616..5016bccc2ac5 100644 --- a/fs/ntfs3/file.c +++ b/fs/ntfs3/file.c @@ -1440,6 +1440,18 @@ static ssize_t ntfs_file_splice_write(struct pipe_inode_info *pipe, return iter_file_splice_write(pipe, file, ppos, len, flags); } +/* + * ntfs_file_fsync - file_operations::fsync + */ +static int ntfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) +{ + struct inode *inode = file_inode(file); + if (unlikely(ntfs3_forced_shutdown(inode->i_sb))) + return -EIO; + + return generic_file_fsync(file, start, end, datasync); +} + // clang-format off const struct inode_operations ntfs_file_inode_operations = { .getattr = ntfs_getattr, @@ -1462,7 +1474,7 @@ const struct file_operations ntfs_file_operations = { .splice_write = ntfs_file_splice_write, .mmap_prepare = ntfs_file_mmap_prepare, .open = ntfs_file_open, - .fsync = generic_file_fsync, + .fsync = ntfs_file_fsync, .fallocate = ntfs_fallocate, .release = ntfs_file_release, }; -- 2.43.0 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-19 9:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20251118130705.411336-1-almaz.alexandrovich@paragon-software.com>
2025-11-19 2:51 ` [PATCH] fs/ntfs3: check for shutdown in fsync kernel test robot
2025-11-19 9:10 ` [PATCH v2] " Konstantin Komarov
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).