Struct file_lock is fairly large, so let's save some space on the stack by
using an allocation for struct file_lock in fcntl_getlk(), just as we do
for fcntl_setlk().
Signed-off-by: Benjamin Coddington
---
fs/locks.c | 46 ++
1 file change
files: that
fl_pid ought to be returned from the filesystem as <= 0 to indicate that
it makes no sense to translate this l_pid.
- Follow up with a patch to have filesystems negate fl_pid for remote
locks on remote files.
Benjamin Coddington (3):
fs/locks:
pdates lustre, 9p, ceph, cifs, and dlm to negate the remote pid
returned for F_GETLK lock requests.
Signed-off-by: Benjamin Coddington
---
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 2 +-
fs/9p/vfs_file.c| 2 +-
fs/ceph/locks.c
translate to
init's pid namespace, so that the locks API can then translate from init's
pid namespace into the pid namespace of the caller.
Signed-off-by: Benjamin Coddington
---
fs/fuse/file.c | 6 +++---
fs/locks.c | 62 ---
On Thu, 22 Oct 2015, Benjamin Coddington wrote:
> Users of the locks API commonly call either posix_lock_file_wait() or
> flock_lock_file_wait() depending upon the lock type. Add a new function
> locks_lock_inode_wait() which will check and call the correct function for
> the type of
Instead of having users check for FL_POSIX or FL_FLOCK to call the correct
locks API function, use the check within locks_lock_inode_wait(). This
allows for some later cleanup.
Signed-off-by: Benjamin Coddington
---
drivers/staging/lustre/lustre/llite/file.c |8 ++--
fs/9p/vfs_file.c
All callers use locks_lock_inode_wait() instead.
Signed-off-by: Benjamin Coddington
---
fs/locks.c |5 +
include/linux/fs.h | 24
2 files changed, 1 insertions(+), 28 deletions(-)
diff --git a/fs/locks.c b/fs/locks.c
index 94d50d3..b6f3c92 100644
.
Benjamin Coddington (3):
locks: introduce locks_lock_inode_wait()
Move locks API users to locks_lock_inode_wait()
locks: cleanup posix_lock_inode_wait and flock_lock_inode_wait
drivers/staging/lustre/lustre/llite/file.c |8 +-
fs/9p/vfs_file.c |4 +-
fs/ceph
Users of the locks API commonly call either posix_lock_file_wait() or
flock_lock_file_wait() depending upon the lock type. Add a new function
locks_lock_inode_wait() which will check and call the correct function for
the type of lock passed in.
Signed-off-by: Benjamin Coddington
---
fs/locks.c