Repository navigation
Commit a03e283
dcache: Reduce the scope of i_lock in d_splice_alias
i_lock is only needed until __d_find_any_alias calls dget on the alias
dentry. After that the reference to new ensures that dentry_kill and
d_delete will not remove the inode from the dentry, and remove the
dentry from the inode->d_entry list.
The inode i_lock came to be held over the the __d_move calls in
d_splice_alias through a series of introduction of locks with
increasing smaller scope. First it was the dcache_lock, then
it was the dcache_inode_lock, and finally inode->i_lock.
Furthermore inode->i_lock is not held over any other calls
to d_move or __d_move so it can not provide any meaningful
rename protection.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>1 parent cde93be commit a03e283
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2718 | 2718 | | |
2719 | 2719 | | |
2720 | 2720 | | |
2721 | | - | |
| 2721 | + | |
2722 | 2722 | | |
2723 | 2723 | | |
2724 | 2724 | | |
| |||
2744 | 2744 | | |
2745 | 2745 | | |
2746 | 2746 | | |
2747 | | - | |
2748 | 2747 | | |
2749 | 2748 | | |
2750 | 2749 | | |
| |||
2790 | 2789 | | |
2791 | 2790 | | |
2792 | 2791 | | |
| 2792 | + | |
| 2793 | + | |
2793 | 2794 | | |
2794 | 2795 | | |
2795 | 2796 | | |
2796 | | - | |
2797 | 2797 | | |
2798 | 2798 | | |
2799 | 2799 | | |
| |||
2812 | 2812 | | |
2813 | 2813 | | |
2814 | 2814 | | |
2815 | | - | |
2816 | 2815 | | |
2817 | 2816 | | |
2818 | 2817 | | |
| |||
0 commit comments