diff options
-rw-r--r-- | fs/nfsd/vfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 1ec1fde3db6e..561a3dcc8cf1 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -782,9 +782,10 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, } *filp = dentry_open(dget(dentry), mntget(fhp->fh_export->ex_path.mnt), flags, current_cred()); - if (IS_ERR(*filp)) + if (IS_ERR(*filp)) { host_err = PTR_ERR(*filp); - else + *filp = NULL; + } else host_err = ima_file_check(*filp, access); out_nfserr: err = nfserrno(host_err); |