@@ -371,7 +371,7 @@ static void nfs_local_call_read(struct work_struct *work)
struct iov_iter iter;
ssize_t status;
- save_cred = override_creds(get_new_cred(filp->f_cred));
+ save_cred = override_creds(filp->f_cred);
nfs_local_iter_init(&iter, iocb, READ);
@@ -381,7 +381,7 @@ static void nfs_local_call_read(struct work_struct *work)
nfs_local_read_done(iocb, status);
nfs_local_pgio_release(iocb);
- put_cred(revert_creds(save_cred));
+ revert_creds(save_cred);
}
static int
@@ -541,7 +541,7 @@ static void nfs_local_call_write(struct work_struct *work)
ssize_t status;
current->flags |= PF_LOCAL_THROTTLE | PF_MEMALLOC_NOIO;
- save_cred = override_creds(get_new_cred(filp->f_cred));
+ save_cred = override_creds(filp->f_cred);
nfs_local_iter_init(&iter, iocb, WRITE);
@@ -554,7 +554,7 @@ static void nfs_local_call_write(struct work_struct *work)
nfs_local_vfs_getattr(iocb);
nfs_local_pgio_release(iocb);
- put_cred(revert_creds(save_cred));
+ revert_creds(save_cred);
current->flags = old_flags;
}
No need for the extra reference count bump. Signed-off-by: Christian Brauner <brauner@kernel.org> --- fs/nfs/localio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)