diff options
author | NeilBrown <neilb@suse.com> | 2018-12-20 02:29:55 +0300 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2019-01-02 20:05:19 +0300 |
commit | c2c7d84fd173aff121ffd45cf15277eff43348d3 (patch) | |
tree | ee0a8951d57bcdcb47b6ac064b0fe2c1e9169e9a /fs/nfs/unlink.c | |
parent | 07e10308ee5da8e6132e0b737ece1c99dd651fb6 (diff) | |
download | linux-c2c7d84fd173aff121ffd45cf15277eff43348d3.tar.xz |
NFS: remove unnecessary test for IS_ERR(cred)
As gte_current_cred() cannot return an error,
this test is not necessary.
It hasn't been necessary for years, but it wasn't so obvious
before.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/unlink.c')
-rw-r--r-- | fs/nfs/unlink.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index a227ab7d6891..79b97b3c4427 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c @@ -348,11 +348,6 @@ nfs_async_rename(struct inode *old_dir, struct inode *new_dir, task_setup_data.callback_data = data; data->cred = get_current_cred(); - if (IS_ERR(data->cred)) { - struct rpc_task *task = ERR_CAST(data->cred); - kfree(data); - return task; - } msg.rpc_argp = &data->args; msg.rpc_resp = &data->res; |