From a4d27e75ffb7b8ecb7eed0c7db0df975525f3fd7 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Sun, 25 Jun 2006 05:48:54 -0700 Subject: [PATCH] fuse: add request interruption Add synchronous request interruption. This is needed for file locking operations which have to be interruptible. However filesystem may implement interruptibility of other operations (e.g. like NFS 'intr' mount option). Signed-off-by: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/fuse/file.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/fuse/file.c') diff --git a/fs/fuse/file.c b/fs/fuse/file.c index ce759414cff9..36f92f181d2f 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -705,6 +705,9 @@ static int fuse_setlk(struct file *file, struct file_lock *fl) fuse_lk_fill(req, file, fl, opcode, pid); request_send(fc, req); err = req->out.h.error; + /* locking is restartable */ + if (err == -EINTR) + err = -ERESTARTSYS; fuse_put_request(fc, req); return err; } -- cgit v1.2.2