aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/file.c
diff options
context:
space:
mode:
authorBenjamin Coddington <bcodding@redhat.com>2015-10-22 13:38:14 -0400
committerJeff Layton <jeff.layton@primarydata.com>2015-10-22 14:57:36 -0400
commit4f6563677ae833baad8003e14353241bc25da4fc (patch)
tree6b54bdaa39f67c13cea45933dedc39f138051de9 /fs/gfs2/file.c
parente55c34a66f87e78fb1fc6b623b78c5ad74b475af (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/gfs2/file.c')
-rw-r--r--fs/gfs2/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index cf4ab89159f4..9287a2d17b8c 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -1000,7 +1000,7 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl)
1000 } 1000 }
1001 if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) { 1001 if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) {
1002 if (fl->fl_type == F_UNLCK) 1002 if (fl->fl_type == F_UNLCK)
1003 posix_lock_file_wait(file, fl); 1003 locks_lock_file_wait(file, fl);
1004 return -EIO; 1004 return -EIO;
1005 } 1005 }
1006 if (IS_GETLK(cmd)) 1006 if (IS_GETLK(cmd))
@@ -1031,7 +1031,7 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl)
1031 if (gl) { 1031 if (gl) {
1032 if (fl_gh->gh_state == state) 1032 if (fl_gh->gh_state == state)
1033 goto out; 1033 goto out;
1034 flock_lock_file_wait(file, 1034 locks_lock_file_wait(file,
1035 &(struct file_lock){.fl_type = F_UNLCK}); 1035 &(struct file_lock){.fl_type = F_UNLCK});
1036 gfs2_glock_dq(fl_gh); 1036 gfs2_glock_dq(fl_gh);
1037 gfs2_holder_reinit(state, flags, fl_gh); 1037 gfs2_holder_reinit(state, flags, fl_gh);
@@ -1056,7 +1056,7 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl)
1056 if (error == GLR_TRYFAILED) 1056 if (error == GLR_TRYFAILED)
1057 error = -EAGAIN; 1057 error = -EAGAIN;
1058 } else { 1058 } else {
1059 error = flock_lock_file_wait(file, fl); 1059 error = locks_lock_file_wait(file, fl);
1060 gfs2_assert_warn(GFS2_SB(&ip->i_inode), !error); 1060 gfs2_assert_warn(GFS2_SB(&ip->i_inode), !error);
1061 } 1061 }
1062 1062
@@ -1071,7 +1071,7 @@ static void do_unflock(struct file *file, struct file_lock *fl)
1071 struct gfs2_holder *fl_gh = &fp->f_fl_gh; 1071 struct gfs2_holder *fl_gh = &fp->f_fl_gh;
1072 1072
1073 mutex_lock(&fp->f_fl_mutex); 1073 mutex_lock(&fp->f_fl_mutex);
1074 flock_lock_file_wait(file, fl); 1074 locks_lock_file_wait(file, fl);
1075 if (fl_gh->gh_gl) { 1075 if (fl_gh->gh_gl) {
1076 gfs2_glock_dq(fl_gh); 1076 gfs2_glock_dq(fl_gh);
1077 gfs2_holder_uninit(fl_gh); 1077 gfs2_holder_uninit(fl_gh);