diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/file.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 45a17b770d97..a2dea5bc0427 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -1199,13 +1199,13 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl) | |||
1199 | mutex_lock(&fp->f_fl_mutex); | 1199 | mutex_lock(&fp->f_fl_mutex); |
1200 | 1200 | ||
1201 | if (gfs2_holder_initialized(fl_gh)) { | 1201 | if (gfs2_holder_initialized(fl_gh)) { |
1202 | struct file_lock request; | ||
1202 | if (fl_gh->gh_state == state) | 1203 | if (fl_gh->gh_state == state) |
1203 | goto out; | 1204 | goto out; |
1204 | locks_lock_file_wait(file, | 1205 | locks_init_lock(&request); |
1205 | &(struct file_lock) { | 1206 | request.fl_type = F_UNLCK; |
1206 | .fl_type = F_UNLCK, | 1207 | request.fl_flags = FL_FLOCK; |
1207 | .fl_flags = FL_FLOCK | 1208 | locks_lock_file_wait(file, &request); |
1208 | }); | ||
1209 | gfs2_glock_dq(fl_gh); | 1209 | gfs2_glock_dq(fl_gh); |
1210 | gfs2_holder_reinit(state, flags, fl_gh); | 1210 | gfs2_holder_reinit(state, flags, fl_gh); |
1211 | } else { | 1211 | } else { |