Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347709
b: refs/heads/master
c: 7007c90
h: refs/heads/master
i:
  347707: f148fed
v: v3
  • Loading branch information
Neil Brown authored and J. Bruce Fields committed Dec 10, 2012
1 parent ffecd7b commit b1d0101
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 756933ee8a75970ca7d8a10e922f5d44720457a4
refs/heads/master: 7007c90fb9fef593b4aeaeee57e6a6754276c97c
8 changes: 5 additions & 3 deletions trunk/fs/nfsd/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ static __be32
do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open)
{
struct svc_fh *resfh;
int accmode;
__be32 status;

resfh = kmalloc(sizeof(struct svc_fh), GFP_KERNEL);
Expand Down Expand Up @@ -254,9 +255,10 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o
/* set reply cache */
fh_copy_shallow(&open->op_openowner->oo_owner.so_replay.rp_openfh,
&resfh->fh_handle);
if (!open->op_created)
status = do_open_permission(rqstp, resfh, open,
NFSD_MAY_NOP);
accmode = NFSD_MAY_NOP;
if (open->op_created)
accmode |= NFSD_MAY_OWNER_OVERRIDE;
status = do_open_permission(rqstp, resfh, open, accmode);
set_change_info(&open->op_cinfo, current_fh);
fh_dup2(current_fh, resfh);
out:
Expand Down
10 changes: 8 additions & 2 deletions trunk/fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,13 +1471,19 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
case NFS3_CREATE_EXCLUSIVE:
if ( dchild->d_inode->i_mtime.tv_sec == v_mtime
&& dchild->d_inode->i_atime.tv_sec == v_atime
&& dchild->d_inode->i_size == 0 )
&& dchild->d_inode->i_size == 0 ) {
if (created)
*created = 1;
break;
}
case NFS4_CREATE_EXCLUSIVE4_1:
if ( dchild->d_inode->i_mtime.tv_sec == v_mtime
&& dchild->d_inode->i_atime.tv_sec == v_atime
&& dchild->d_inode->i_size == 0 )
&& dchild->d_inode->i_size == 0 ) {
if (created)
*created = 1;
goto set_attr;
}
/* fallthru */
case NFS3_CREATE_GUARDED:
err = nfserr_exist;
Expand Down

0 comments on commit b1d0101

Please sign in to comment.