diff options
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index f21e917bb8ed..bb4d926e4487 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -1177,7 +1177,7 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, | |||
1177 | /* | 1177 | /* |
1178 | * Get the dir op function pointer. | 1178 | * Get the dir op function pointer. |
1179 | */ | 1179 | */ |
1180 | err = nfserr_perm; | 1180 | err = 0; |
1181 | switch (type) { | 1181 | switch (type) { |
1182 | case S_IFREG: | 1182 | case S_IFREG: |
1183 | host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL); | 1183 | host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL); |
@@ -1237,7 +1237,7 @@ __be32 | |||
1237 | nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp, | 1237 | nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp, |
1238 | char *fname, int flen, struct iattr *iap, | 1238 | char *fname, int flen, struct iattr *iap, |
1239 | struct svc_fh *resfhp, int createmode, u32 *verifier, | 1239 | struct svc_fh *resfhp, int createmode, u32 *verifier, |
1240 | int *truncp) | 1240 | int *truncp, int *created) |
1241 | { | 1241 | { |
1242 | struct dentry *dentry, *dchild = NULL; | 1242 | struct dentry *dentry, *dchild = NULL; |
1243 | struct inode *dirp; | 1243 | struct inode *dirp; |
@@ -1331,6 +1331,8 @@ nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp, | |||
1331 | host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL); | 1331 | host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL); |
1332 | if (host_err < 0) | 1332 | if (host_err < 0) |
1333 | goto out_nfserr; | 1333 | goto out_nfserr; |
1334 | if (created) | ||
1335 | *created = 1; | ||
1334 | 1336 | ||
1335 | if (EX_ISSYNC(fhp->fh_export)) { | 1337 | if (EX_ISSYNC(fhp->fh_export)) { |
1336 | err = nfserrno(nfsd_sync_dir(dentry)); | 1338 | err = nfserrno(nfsd_sync_dir(dentry)); |