Skip to content

Commit c8d80f8

Browse files
committed
Merge tag 'nfsd-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd fix from Chuck Lever: - Address a deadlock regression in RELEASE_LOCKOWNER * tag 'nfsd-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: nfsd: don't take fi_lock in nfsd_break_deleg_cb()
2 parents 6d280f4 + 5ea9a7c commit c8d80f8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

fs/nfsd/nfs4state.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4945,10 +4945,8 @@ nfsd_break_deleg_cb(struct file_lock *fl)
49454945
*/
49464946
fl->fl_break_time = 0;
49474947

4948-
spin_lock(&fp->fi_lock);
49494948
fp->fi_had_conflict = true;
49504949
nfsd_break_one_deleg(dp);
4951-
spin_unlock(&fp->fi_lock);
49524950
return false;
49534951
}
49544952

@@ -5557,12 +5555,13 @@ nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
55575555
if (status)
55585556
goto out_unlock;
55595557

5558+
status = -EAGAIN;
5559+
if (fp->fi_had_conflict)
5560+
goto out_unlock;
5561+
55605562
spin_lock(&state_lock);
55615563
spin_lock(&fp->fi_lock);
5562-
if (fp->fi_had_conflict)
5563-
status = -EAGAIN;
5564-
else
5565-
status = hash_delegation_locked(dp, fp);
5564+
status = hash_delegation_locked(dp, fp);
55665565
spin_unlock(&fp->fi_lock);
55675566
spin_unlock(&state_lock);
55685567

0 commit comments

Comments
 (0)