From c2c7d84fd173aff121ffd45cf15277eff43348d3 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 20 Dec 2018 10:29:55 +1100 Subject: 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 Signed-off-by: NeilBrown Signed-off-by: Anna Schumaker --- fs/nfs/unlink.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'fs') 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; -- cgit v1.2.3