From: Kinglong Mee Date: Tue, 2 Sep 2014 14:11:27 +0000 (+0800) Subject: NFSD: Reset creds after mnt_want_write_file() fail X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c2236f141ebb6198af0839b8e4f804ead2d30ca8;p=linux-beck.git NFSD: Reset creds after mnt_want_write_file() fail Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 9c271f42604a..e37ac1c53adb 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); }