nfsd4: don't BUG in delegation break callback
These conditions would indeed indicate bugs in the code, but if we want to hear about them we're likely better off warning and returning than immediately dying while holding file_lock_lock. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
7032a3dd92
commit
7fa10cd12d
@ -2554,9 +2554,14 @@ static void nfsd_break_deleg_cb(struct file_lock *fl)
|
|||||||
struct nfs4_file *fp = (struct nfs4_file *)fl->fl_owner;
|
struct nfs4_file *fp = (struct nfs4_file *)fl->fl_owner;
|
||||||
struct nfs4_delegation *dp;
|
struct nfs4_delegation *dp;
|
||||||
|
|
||||||
BUG_ON(!fp);
|
if (!fp) {
|
||||||
/* We assume break_lease is only called once per lease: */
|
WARN(1, "(%p)->fl_owner NULL\n", fl);
|
||||||
BUG_ON(fp->fi_had_conflict);
|
return;
|
||||||
|
}
|
||||||
|
if (fp->fi_had_conflict) {
|
||||||
|
WARN(1, "duplicate break on %p\n", fp);
|
||||||
|
return;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* We don't want the locks code to timeout the lease for us;
|
* We don't want the locks code to timeout the lease for us;
|
||||||
* we'll remove it ourself if a delegation isn't returned
|
* we'll remove it ourself if a delegation isn't returned
|
||||||
|
Loading…
x
Reference in New Issue
Block a user