Skip to contentSkip to conversation

kernfs: Add noop_fsync to supported kernfs_file_fops

PATCH New Luck, Tony 1 participant 1 message Oct 14, 2016 kernfs

lore
Share & tools
lore

Luck, Tony

author
#0 lore raw

PATCH 1/1 kernfs: Add noop_fsync to supported kernfs_file_fops

From: Tony Luck <[email protected]>

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.

---
 fs/kernfs/file.c | 1 +
 1 file changed, 1 insertion(+)
fs/kernfs/file.c +1 -0
index 2bcb86e6e6ca..78219d5644e9 100644
@@ -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,
 };
 
 /**
Signature · 1 line
2.5.0