Commit 62e5396
committed
smb: avoid pointless cred reference count bump
The creds are allocated via prepare_kernel_cred() which has already
taken a reference.
This also removes a pointless check that gives the impression that
override_creds() can ever be called on a task with current->cred NULL.
That's not possible afaict. Remove the check to not imply that there can
be a dangling pointer in current->cred.
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Jeff Layton <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>1 parent 2b315ed commit 62e5396
1 file changed
+3
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
| 783 | + | |
788 | 784 | | |
789 | 785 | | |
790 | 786 | | |
| |||
796 | 792 | | |
797 | 793 | | |
798 | 794 | | |
799 | | - | |
800 | 795 | | |
801 | 796 | | |
802 | | - | |
803 | | - | |
804 | | - | |
| 797 | + | |
805 | 798 | | |
| 799 | + | |
806 | 800 | | |
807 | 801 | | |
808 | 802 | | |
| |||
0 commit comments