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/dlm/plock.c | |
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/dlm/plock.c')
-rw-r--r-- | fs/dlm/plock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index 5532f097f6da..3585cc056fd1 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c | |||
@@ -172,7 +172,7 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file, | |||
172 | rv = op->info.rv; | 172 | rv = op->info.rv; |
173 | 173 | ||
174 | if (!rv) { | 174 | if (!rv) { |
175 | if (posix_lock_file_wait(file, fl) < 0) | 175 | if (locks_lock_file_wait(file, fl) < 0) |
176 | log_error(ls, "dlm_posix_lock: vfs lock error %llx", | 176 | log_error(ls, "dlm_posix_lock: vfs lock error %llx", |
177 | (unsigned long long)number); | 177 | (unsigned long long)number); |
178 | } | 178 | } |
@@ -262,7 +262,7 @@ int dlm_posix_unlock(dlm_lockspace_t *lockspace, u64 number, struct file *file, | |||
262 | /* cause the vfs unlock to return ENOENT if lock is not found */ | 262 | /* cause the vfs unlock to return ENOENT if lock is not found */ |
263 | fl->fl_flags |= FL_EXISTS; | 263 | fl->fl_flags |= FL_EXISTS; |
264 | 264 | ||
265 | rv = posix_lock_file_wait(file, fl); | 265 | rv = locks_lock_file_wait(file, fl); |
266 | if (rv == -ENOENT) { | 266 | if (rv == -ENOENT) { |
267 | rv = 0; | 267 | rv = 0; |
268 | goto out_free; | 268 | goto out_free; |