Skip to content

Commit

Permalink
kernfs: Add noop_fsync to supported kernfs_file_fops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tony Luck authored and Greg Kroah-Hartman committed Oct 27, 2016
1 parent 07d9a38 commit 2a9becd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/kernfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,7 @@ const struct file_operations kernfs_file_fops = {
.open = kernfs_fop_open,
.release = kernfs_fop_release,
.poll = kernfs_fop_poll,
.fsync = noop_fsync,
};

/**
Expand Down

0 comments on commit 2a9becd

Please sign in to comment.