mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
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>
This commit is contained in:
parent
8519f994e5
commit
c2236f141e
@ -188,7 +188,7 @@ nfsd4_create_clid_dir(struct nfs4_client *clp)
|
|||||||
|
|
||||||
status = mnt_want_write_file(nn->rec_file);
|
status = mnt_want_write_file(nn->rec_file);
|
||||||
if (status)
|
if (status)
|
||||||
return;
|
goto out_creds;
|
||||||
|
|
||||||
dir = nn->rec_file->f_path.dentry;
|
dir = nn->rec_file->f_path.dentry;
|
||||||
/* lock the parent */
|
/* lock the parent */
|
||||||
@ -228,6 +228,7 @@ out_unlock:
|
|||||||
user_recovery_dirname);
|
user_recovery_dirname);
|
||||||
}
|
}
|
||||||
mnt_drop_write_file(nn->rec_file);
|
mnt_drop_write_file(nn->rec_file);
|
||||||
|
out_creds:
|
||||||
nfs4_reset_creds(original_cred);
|
nfs4_reset_creds(original_cred);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user