aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index f19ed866c95f..6a8fedaa4f55 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -34,6 +34,7 @@
34 34
35#include <linux/file.h> 35#include <linux/file.h>
36#include <linux/smp_lock.h> 36#include <linux/smp_lock.h>
37#include <linux/slab.h>
37#include <linux/namei.h> 38#include <linux/namei.h>
38#include <linux/swap.h> 39#include <linux/swap.h>
39#include <linux/sunrpc/svcauth_gss.h> 40#include <linux/sunrpc/svcauth_gss.h>
@@ -1998,7 +1999,9 @@ nfs4_file_downgrade(struct file *filp, unsigned int share_access)
1998{ 1999{
1999 if (share_access & NFS4_SHARE_ACCESS_WRITE) { 2000 if (share_access & NFS4_SHARE_ACCESS_WRITE) {
2000 drop_file_write_access(filp); 2001 drop_file_write_access(filp);
2002 spin_lock(&filp->f_lock);
2001 filp->f_mode = (filp->f_mode | FMODE_READ) & ~FMODE_WRITE; 2003 filp->f_mode = (filp->f_mode | FMODE_READ) & ~FMODE_WRITE;
2004 spin_unlock(&filp->f_lock);
2002 } 2005 }
2003} 2006}
2004 2007
@@ -2480,8 +2483,10 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
2480 } 2483 }
2481 memcpy(&open->op_stateid, &stp->st_stateid, sizeof(stateid_t)); 2484 memcpy(&open->op_stateid, &stp->st_stateid, sizeof(stateid_t));
2482 2485
2483 if (nfsd4_has_session(&resp->cstate)) 2486 if (nfsd4_has_session(&resp->cstate)) {
2484 open->op_stateowner->so_confirmed = 1; 2487 open->op_stateowner->so_confirmed = 1;
2488 nfsd4_create_clid_dir(open->op_stateowner->so_client);
2489 }
2485 2490
2486 /* 2491 /*
2487 * Attempt to hand out a delegation. No error return, because the 2492 * Attempt to hand out a delegation. No error return, because the