lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <148167605339.19309.3008786993520130856.stgit@maxim-thinkpad>
Date:   Tue, 13 Dec 2016 16:42:49 -0800
From:   Maxim Patlasov <mpatlasov@...tuozzo.com>
To:     <miklos@...redi.hu>
CC:     <linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <mpatlasov@...tuozzo.com>
Subject: [PATCH] fuse: relax inode_lock on fsync(2)

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@...tuozzo.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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ