[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 <miklos@szeredi.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
f9a2842e56
commit
a4d27e75ff
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user