summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2014-09-02 22:11:27 +0800
committerJ. Bruce Fields <bfields@redhat.com>2014-09-03 17:43:01 -0400
commitc2236f141ebb6198af0839b8e4f804ead2d30ca8 (patch)
tree24d533fe482261e1437f0df6d21e9c9dfc658a23 /fs
parent8519f994e5cf27ecdac3b0fe2a4dc7abd320643e (diff)
downloadop-kernel-dev-c2236f141ebb6198af0839b8e4f804ead2d30ca8.zip
op-kernel-dev-c2236f141ebb6198af0839b8e4f804ead2d30ca8.tar.gz
NFSD: Reset creds after mnt_want_write_file() fail
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4recover.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index 9c271f4..e37ac1c 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -188,7 +188,7 @@ nfsd4_create_clid_dir(struct nfs4_client *clp)
status = mnt_want_write_file(nn->rec_file);
if (status)
- return;
+ goto out_creds;
dir = nn->rec_file->f_path.dentry;
/* lock the parent */
@@ -228,6 +228,7 @@ out_unlock:
user_recovery_dirname);
}
mnt_drop_write_file(nn->rec_file);
+out_creds:
nfs4_reset_creds(original_cred);
}
OpenPOWER on IntegriCloud