We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81be9a8 commit 7708f3aCopy full SHA for 7708f3a
fs/open.c
@@ -402,7 +402,6 @@ static bool access_need_override_creds(int flags)
402
403
static const struct cred *access_override_creds(void)
404
{
405
- const struct cred *old_cred;
406
struct cred *override_cred;
407
408
override_cred = prepare_creds();
@@ -447,13 +446,7 @@ static const struct cred *access_override_creds(void)
447
446
* freeing.
448
*/
449
override_cred->non_rcu = 1;
450
-
451
- old_cred = override_creds(get_new_cred(override_cred));
452
453
- /* override_cred() gets its own ref */
454
- put_cred(override_cred);
455
456
- return old_cred;
+ return override_creds(override_cred);
457
}
458
459
static long do_faccessat(int dfd, const char __user *filename, int mode, int flags)
0 commit comments