From e893272f4604ca0c279009bd0b633f2b1f46af07 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Tue, 23 Apr 2013 14:52:44 -0400 Subject: [PATCH] --- yaml --- r: 367317 b: refs/heads/master c: bdeca1b76cd56cd10a029f0ad2fd9ab6dd7e313d h: refs/heads/master i: 367315: 54a25ee5cead5199e205f596114e47f33f1ab8ce v: v3 --- [refs] | 2 +- trunk/fs/nfs/nfs4proc.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 83bbca5874e7..d808f0aa1e91 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cd4c9be2c61d4d974d348743fddb8183b8185abc +refs/heads/master: bdeca1b76cd56cd10a029f0ad2fd9ab6dd7e313d diff --git a/trunk/fs/nfs/nfs4proc.c b/trunk/fs/nfs/nfs4proc.c index ea50807b65d9..e18b3b46c001 100644 --- a/trunk/fs/nfs/nfs4proc.c +++ b/trunk/fs/nfs/nfs4proc.c @@ -769,6 +769,7 @@ struct nfs4_opendata { struct iattr attrs; unsigned long timestamp; unsigned int rpc_done : 1; + unsigned int is_recover : 1; int rpc_status; int cancelled; }; @@ -1101,9 +1102,11 @@ static struct nfs4_state *nfs4_try_open_cached(struct nfs4_opendata *opendata) /* Save the delegation */ nfs4_stateid_copy(&stateid, &delegation->stateid); rcu_read_unlock(); - ret = nfs_may_open(state->inode, state->owner->so_cred, open_mode); - if (ret != 0) - goto out; + if (!opendata->is_recover) { + ret = nfs_may_open(state->inode, state->owner->so_cred, open_mode); + if (ret != 0) + goto out; + } ret = -EAGAIN; /* Try to update the stateid using the delegation */ @@ -1670,8 +1673,11 @@ static int nfs4_run_open_task(struct nfs4_opendata *data, int isrecover) data->rpc_done = 0; data->rpc_status = 0; data->cancelled = 0; - if (isrecover) + data->is_recover = 0; + if (isrecover) { nfs4_set_sequence_privileged(&o_arg->seq_args); + data->is_recover = 1; + } task = rpc_run_task(&task_setup_data); if (IS_ERR(task)) return PTR_ERR(task);