From: Dan Duval Date: Wed, 25 Nov 2015 23:39:48 +0000 (-0500) Subject: Revert "nfs: take extra reference to fl->fl_file when running a LOCKU operation" X-Git-Tag: v4.1.12-92~228^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7923c5f12cd0b4cd0cb966bb2a918ec2f96eb59a;p=users%2Fjedix%2Flinux-maple.git Revert "nfs: take extra reference to fl->fl_file when running a LOCKU operation" Orabug: 22186705 This reverts commit 0ea14034782db03efc55a7d8dbfa7cd140e7e959. This commit has been seen to cause hard hangs or crashes when flock(..., LOCK_EX) is attempted on an NFSv4-mounted filesystem. Signed-off-by: Dan Duval Reviewed-by: Santosh Shilimkar --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 4016ad72dbdc..55e1e3af23a3 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -5402,7 +5402,6 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl, atomic_inc(&lsp->ls_count); /* Ensure we don't close file until we're done freeing locks! */ p->ctx = get_nfs_open_context(ctx); - get_file(fl->fl_file); memcpy(&p->fl, fl, sizeof(p->fl)); p->server = NFS_SERVER(inode); return p; @@ -5414,7 +5413,6 @@ static void nfs4_locku_release_calldata(void *data) nfs_free_seqid(calldata->arg.seqid); nfs4_put_lock_state(calldata->lsp); put_nfs_open_context(calldata->ctx); - fput(calldata->fl.fl_file); kfree(calldata); }