mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
[PATCH] vfs: add lock owner argument to flush operation
Pass the POSIX lock owner ID to the flush operation. This is useful for filesystems which don't want to store any locking state in inode->i_flock but want to handle locking/unlocking POSIX locks internally. FUSE is one such filesystem but I think it possible that some network filesystems would need this also. Also add a flag to indicate that a POSIX locking request was generated by close(), so filesystems using the above feature won't send an extra locking request in this case. Signed-off-by: Miklos Szeredi <miklos@szeredi.hu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
ff7b86b820
commit
75e1fcc0b1
14 changed files with 16 additions and 16 deletions
|
@ -1152,7 +1152,7 @@ int filp_close(struct file *filp, fl_owner_t id)
|
|||
}
|
||||
|
||||
if (filp->f_op && filp->f_op->flush)
|
||||
retval = filp->f_op->flush(filp);
|
||||
retval = filp->f_op->flush(filp, id);
|
||||
|
||||
dnotify_flush(filp, id);
|
||||
locks_remove_posix(filp, id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue