--- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -1035,7 +1035,10 @@ static int do_flock(struct file *file, i if (fl_gh->gh_state == state) goto out; locks_lock_file_wait(file, - &(struct file_lock){.fl_type = F_UNLCK}); + &(struct file_lock) { + .fl_type = F_UNLCK, + .fl_flags = FL_FLOCK + }); gfs2_glock_dq(fl_gh); gfs2_holder_reinit(state, flags, fl_gh); } else {