diff options
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r-- | fs/nfsd/vfs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index ba944123167b..ff476e654b8f 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -1252,10 +1252,13 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, | |||
1252 | if (IS_ERR(dchild)) | 1252 | if (IS_ERR(dchild)) |
1253 | return nfserrno(host_err); | 1253 | return nfserrno(host_err); |
1254 | err = fh_compose(resfhp, fhp->fh_export, dchild, fhp); | 1254 | err = fh_compose(resfhp, fhp->fh_export, dchild, fhp); |
1255 | if (err) { | 1255 | /* |
1256 | dput(dchild); | 1256 | * We unconditionally drop our ref to dchild as fh_compose will have |
1257 | * already grabbed its own ref for it. | ||
1258 | */ | ||
1259 | dput(dchild); | ||
1260 | if (err) | ||
1257 | return err; | 1261 | return err; |
1258 | } | ||
1259 | return nfsd_create_locked(rqstp, fhp, fname, flen, iap, type, | 1262 | return nfsd_create_locked(rqstp, fhp, fname, flen, iap, type, |
1260 | rdev, resfhp); | 1263 | rdev, resfhp); |
1261 | } | 1264 | } |