diff options
author | Benjamin Coddington <bcodding@redhat.com> | 2015-10-22 13:38:14 -0400 |
---|---|---|
committer | Jeff Layton <jeff.layton@primarydata.com> | 2015-10-22 14:57:36 -0400 |
commit | 4f6563677ae833baad8003e14353241bc25da4fc (patch) | |
tree | 6b54bdaa39f67c13cea45933dedc39f138051de9 /fs/ceph | |
parent | e55c34a66f87e78fb1fc6b623b78c5ad74b475af (diff) |
Move locks API users to locks_lock_inode_wait()
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 <bcodding@redhat.com>
Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/locks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/locks.c b/fs/ceph/locks.c index 6706bde9ad1b..a2cb0c254060 100644 --- a/fs/ceph/locks.c +++ b/fs/ceph/locks.c | |||
@@ -228,12 +228,12 @@ int ceph_flock(struct file *file, int cmd, struct file_lock *fl) | |||
228 | err = ceph_lock_message(CEPH_LOCK_FLOCK, CEPH_MDS_OP_SETFILELOCK, | 228 | err = ceph_lock_message(CEPH_LOCK_FLOCK, CEPH_MDS_OP_SETFILELOCK, |
229 | file, lock_cmd, wait, fl); | 229 | file, lock_cmd, wait, fl); |
230 | if (!err) { | 230 | if (!err) { |
231 | err = flock_lock_file_wait(file, fl); | 231 | err = locks_lock_file_wait(file, fl); |
232 | if (err) { | 232 | if (err) { |
233 | ceph_lock_message(CEPH_LOCK_FLOCK, | 233 | ceph_lock_message(CEPH_LOCK_FLOCK, |
234 | CEPH_MDS_OP_SETFILELOCK, | 234 | CEPH_MDS_OP_SETFILELOCK, |
235 | file, CEPH_LOCK_UNLOCK, 0, fl); | 235 | file, CEPH_LOCK_UNLOCK, 0, fl); |
236 | dout("got %d on flock_lock_file_wait, undid lock", err); | 236 | dout("got %d on locks_lock_file_wait, undid lock", err); |
237 | } | 237 | } |
238 | } | 238 | } |
239 | return err; | 239 | return err; |