Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

VFS: unexport lock_rename(), lock_rename_child(), unlock_rename()

These three function are now only used in namei.c, so they don't need to
be exported.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: NeilBrown <neil@brown.name>
Link: https://patch.msgid.link/20260224222542.3458677-16-neilb@ownmail.net
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

NeilBrown and committed by
Christian Brauner
4d94ce88 54d7ea73

+10 -9
+7
Documentation/filesystems/porting.rst
··· 1368 1368 1369 1369 lookup_one_qstr_excl() is no longer exported - use start_creating() or 1370 1370 similar. 1371 + --- 1372 + 1373 + ** mandatory** 1374 + 1375 + lock_rename(), lock_rename_child(), unlock_rename() are no 1376 + longer available. Use start_renaming() or similar. 1377 +
+3 -6
fs/namei.c
··· 3775 3775 /* 3776 3776 * p1 and p2 should be directories on the same fs. 3777 3777 */ 3778 - struct dentry *lock_rename(struct dentry *p1, struct dentry *p2) 3778 + static struct dentry *lock_rename(struct dentry *p1, struct dentry *p2) 3779 3779 { 3780 3780 if (p1 == p2) { 3781 3781 inode_lock_nested(p1->d_inode, I_MUTEX_PARENT); ··· 3785 3785 mutex_lock(&p1->d_sb->s_vfs_rename_mutex); 3786 3786 return lock_two_directories(p1, p2); 3787 3787 } 3788 - EXPORT_SYMBOL(lock_rename); 3789 3788 3790 3789 /* 3791 3790 * c1 and p2 should be on the same fs. 3792 3791 */ 3793 - struct dentry *lock_rename_child(struct dentry *c1, struct dentry *p2) 3792 + static struct dentry *lock_rename_child(struct dentry *c1, struct dentry *p2) 3794 3793 { 3795 3794 if (READ_ONCE(c1->d_parent) == p2) { 3796 3795 /* ··· 3826 3827 mutex_unlock(&c1->d_sb->s_vfs_rename_mutex); 3827 3828 return NULL; 3828 3829 } 3829 - EXPORT_SYMBOL(lock_rename_child); 3830 3830 3831 - void unlock_rename(struct dentry *p1, struct dentry *p2) 3831 + static void unlock_rename(struct dentry *p1, struct dentry *p2) 3832 3832 { 3833 3833 inode_unlock(p1->d_inode); 3834 3834 if (p1 != p2) { ··· 3835 3837 mutex_unlock(&p1->d_sb->s_vfs_rename_mutex); 3836 3838 } 3837 3839 } 3838 - EXPORT_SYMBOL(unlock_rename); 3839 3840 3840 3841 /** 3841 3842 * __start_renaming - lookup and lock names for rename
-3
include/linux/namei.h
··· 165 165 extern int follow_down(struct path *path, unsigned int flags); 166 166 extern int follow_up(struct path *); 167 167 168 - extern struct dentry *lock_rename(struct dentry *, struct dentry *); 169 - extern struct dentry *lock_rename_child(struct dentry *, struct dentry *); 170 - extern void unlock_rename(struct dentry *, struct dentry *); 171 168 int start_renaming(struct renamedata *rd, int lookup_flags, 172 169 struct qstr *old_last, struct qstr *new_last); 173 170 int start_renaming_dentry(struct renamedata *rd, int lookup_flags,