Skip to content

Commit 2a9becd

Browse files
aeglgregkh
authored andcommitted
kernfs: Add noop_fsync to supported kernfs_file_fops
If you edit a kernfs backed file with vi(1), you see an ugly error message when you write the file because vi tries to fsync(2) the file after writing, which fails. We have noop_fsync() for this, use it. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 07d9a38 commit 2a9becd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/kernfs/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,7 @@ const struct file_operations kernfs_file_fops = {
911911
.open = kernfs_fop_open,
912912
.release = kernfs_fop_release,
913913
.poll = kernfs_fop_poll,
914+
.fsync = noop_fsync,
914915
};
915916

916917
/**

0 commit comments

Comments
 (0)