Commit c8d80f83 authored by Linus Torvalds's avatar Linus Torvalds

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()
parents 6d280f4d 5ea9a7c5
...@@ -4945,10 +4945,8 @@ nfsd_break_deleg_cb(struct file_lock *fl) ...@@ -4945,10 +4945,8 @@ nfsd_break_deleg_cb(struct file_lock *fl)
*/ */
fl->fl_break_time = 0; fl->fl_break_time = 0;
spin_lock(&fp->fi_lock);
fp->fi_had_conflict = true; fp->fi_had_conflict = true;
nfsd_break_one_deleg(dp); nfsd_break_one_deleg(dp);
spin_unlock(&fp->fi_lock);
return false; return false;
} }
...@@ -5557,12 +5555,13 @@ nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp, ...@@ -5557,12 +5555,13 @@ nfs4_set_delegation(struct nfsd4_open *open, struct nfs4_ol_stateid *stp,
if (status) if (status)
goto out_unlock; goto out_unlock;
status = -EAGAIN;
if (fp->fi_had_conflict)
goto out_unlock;
spin_lock(&state_lock); spin_lock(&state_lock);
spin_lock(&fp->fi_lock); spin_lock(&fp->fi_lock);
if (fp->fi_had_conflict) status = hash_delegation_locked(dp, fp);
status = -EAGAIN;
else
status = hash_delegation_locked(dp, fp);
spin_unlock(&fp->fi_lock); spin_unlock(&fp->fi_lock);
spin_unlock(&state_lock); spin_unlock(&state_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment