All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fuse: relax inode_lock on fsync(2)
@ 2016-12-14  0:42 Maxim Patlasov
  0 siblings, 0 replies; only message in thread
From: Maxim Patlasov @ 2016-12-14  0:42 UTC (permalink / raw)
  To: miklos; +Cc: linux-fsdevel, linux-kernel, mpatlasov

Sometimes handling FUSE_FSYNC in userspace may take a while. No need
to block incoming writes while userspace processes FUSE_FSYNC.

Signed-off-by: Maxim Patlasov <mpatlasov@virtuozzo.com>
---
 fs/fuse/file.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 2401c5d..9d52a8a 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -483,6 +483,8 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end,
 	if ((!isdir && fc->no_fsync) || (isdir && fc->no_fsyncdir))
 		goto out;
 
+	inode_unlock(inode);
+
 	memset(&inarg, 0, sizeof(inarg));
 	inarg.fh = ff->fh;
 	inarg.fsync_flags = datasync ? 1 : 0;
@@ -499,6 +501,7 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end,
 			fc->no_fsync = 1;
 		err = 0;
 	}
+	return err;
 out:
 	inode_unlock(inode);
 	return err;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-14  0:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14  0:42 [PATCH] fuse: relax inode_lock on fsync(2) Maxim Patlasov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.