]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: Don't take a reference on fl->fl_file for LOCK operation
authorBenjamin Coddington <bcodding@redhat.com>
Thu, 5 Jan 2017 15:20:16 +0000 (10:20 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 12 Jan 2017 17:51:29 +0000 (12:51 -0500)
commit9a61c9960e2444bc452da3ccbfb3e2fc5b3bbc22
treef52a87c8690567266fa29b829ec231303f7cbe0d
parentf860b361d801aefbaf73e56bea0acfd26ed6e227
nfs: Don't take a reference on fl->fl_file for LOCK operation

I have reports of a crash that look like __fput() was called twice for
a NFSv4.0 file.  It seems possible that the state manager could try to
reclaim a lock and take a reference on the fl->fl_file at the same time the
file is being released if, during the close(), a signal interrupts the wait
for outstanding IO while removing locks which then skips the removal
of that lock.

Since cc71ab8c8fb2 ("nfs4: have do_vfs_lock take an inode pointer") has
removed the need to traverse fl->fl_file->f_inode in nfs4_lock_done(),
taking that reference is no longer necessary.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4proc.c