From 7923c5f12cd0b4cd0cb966bb2a918ec2f96eb59a Mon Sep 17 00:00:00 2001 From: Dan Duval Date: Wed, 25 Nov 2015 18:39:48 -0500 Subject: [PATCH] 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 --- fs/nfs/nfs4proc.c | 2 -- 1 file changed, 2 deletions(-) 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); } -- 2.50.1