Commit 3661a78
VFS: tidy up do_unlinkat()
The simplification of locking in the previous patch opens up some room
for tidying up do_unlinkat()
- change all "exit" labels to describe what will happen at the label.
- always goto an exit label on an error - unwrap the "if (!IS_ERR())" branch.
- Move the "slashes" handing inline, but mark it as unlikely()
- simplify use of the "inode" variable - we no longer need to test for NULL.
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neil@brown.name>
Link: https://patch.msgid.link/20251113002050.676694-4-neilb@ownmail.net
Tested-by: syzbot@syzkaller.appspotmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>1 parent 4037d96 commit 3661a78
1 file changed
Lines changed: 26 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4755 | 4755 | | |
4756 | 4756 | | |
4757 | 4757 | | |
4758 | | - | |
| 4758 | + | |
4759 | 4759 | | |
4760 | 4760 | | |
4761 | 4761 | | |
4762 | 4762 | | |
4763 | 4763 | | |
4764 | | - | |
| 4764 | + | |
4765 | 4765 | | |
4766 | 4766 | | |
4767 | 4767 | | |
4768 | | - | |
| 4768 | + | |
4769 | 4769 | | |
4770 | 4770 | | |
4771 | 4771 | | |
4772 | | - | |
| 4772 | + | |
4773 | 4773 | | |
4774 | 4774 | | |
4775 | 4775 | | |
4776 | | - | |
| 4776 | + | |
| 4777 | + | |
4777 | 4778 | | |
4778 | | - | |
4779 | | - | |
4780 | | - | |
4781 | | - | |
4782 | | - | |
4783 | | - | |
4784 | | - | |
4785 | | - | |
4786 | | - | |
4787 | | - | |
4788 | | - | |
| 4779 | + | |
| 4780 | + | |
| 4781 | + | |
| 4782 | + | |
| 4783 | + | |
| 4784 | + | |
4789 | 4785 | | |
| 4786 | + | |
4790 | 4787 | | |
4791 | | - | |
4792 | | - | |
4793 | | - | |
| 4788 | + | |
| 4789 | + | |
| 4790 | + | |
| 4791 | + | |
| 4792 | + | |
| 4793 | + | |
| 4794 | + | |
| 4795 | + | |
| 4796 | + | |
| 4797 | + | |
4794 | 4798 | | |
4795 | 4799 | | |
4796 | 4800 | | |
4797 | 4801 | | |
4798 | 4802 | | |
| 4803 | + | |
4799 | 4804 | | |
4800 | | - | |
| 4805 | + | |
4801 | 4806 | | |
4802 | 4807 | | |
4803 | 4808 | | |
4804 | | - | |
4805 | 4809 | | |
4806 | 4810 | | |
4807 | | - | |
| 4811 | + | |
4808 | 4812 | | |
4809 | 4813 | | |
4810 | | - | |
4811 | | - | |
4812 | | - | |
4813 | | - | |
4814 | | - | |
4815 | | - | |
4816 | | - | |
4817 | 4814 | | |
4818 | 4815 | | |
4819 | 4816 | | |
| |||
0 commit comments