Skip to content

Minor cleanup for locks API

Benjamin Coddington linux-fsdevel linux-nfs lkml 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 2 repliesIn review
  2. v13 patches 1 replySuperseded

Changes in v2 from the cover letter

- fix typo that caused build failure for CONFIG_FILE_LOCKS=n
- make posix_lock_inode_wait and flock_lock_inode_wait static
- trimmed away a number of distro-lists to minimize cross-posting

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3locks: introduce locks_lock_inode_wait()fs/locks.c include/linux/fs.h+35 -00 replies
2/3Move locks API users to locks_lock_inode_wait()drivers/staging/lustre/lustre/llite/file.c fs/9p/vfs_file.c fs/ceph/locks.c +9 more+22 -590 replies
3/3locks: cleanup posix_lock_inode_wait and flock_lock_inode_waitfs/locks.c include/linux/fs.h+3 -300 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH V2 0/3] Minor cleanup for locks API

NFS has recently been moving things around to cope with the situation where a struct file may not be available during an unlock. That work has presented an opportunity to do a minor cleanup on the locks API.

Users of posix_lock_file_wait() (for FL_POSIX style locks) and flock_lock_file_wait() (for FL_FLOCK style locks) can instead call locks_lock_file_wait() for both lock types. Because the passed-in file_lock specifies its own type, the correct function can be selected on behalf of the user.

This work allows further cleanup within NFS and lockd which will be submitted separately.

Changes in v2:
- fix typo that caused build failure for CONFIG_FILE_LOCKS=n
- make posix_lock_inode_wait and flock_lock_inode_wait static
- trimmed away a number of distro-lists to minimize cross-posting

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/locks.c                            |    4 +-
 fs/cifs/file.c                             |    2 +-
 fs/dlm/plock.c                             |    4 +-
 fs/fuse/file.c                             |    2 +-
 fs/gfs2/file.c                             |    8 +++---
 fs/lockd/clntproc.c                        |   13 +---------
 fs/locks.c                                 |   35 ++++++++++++++++++++++-----
 fs/nfs/file.c                              |   13 +---------
 fs/nfs/nfs4proc.c                          |   13 +---------
 fs/ocfs2/locks.c                           |    8 +++---
 include/linux/fs.h                         |   21 +++-------------
 13 files changed, 53 insertions(+), 82 deletions(-)