Skip to content

Commit 8e22cc8

Browse files
Marco StornelliAl Viro
authored andcommitted
vfs: drop lock/unlock super
Removed s_lock from super_block and removed lock/unlock super. Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent b696332 commit 8e22cc8

2 files changed

Lines changed: 0 additions & 24 deletions

File tree

‎fs/super.c‎

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,7 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags)
186186
spin_lock_init(&s->s_inode_lru_lock);
187187
INIT_LIST_HEAD(&s->s_mounts);
188188
init_rwsem(&s->s_umount);
189-
mutex_init(&s->s_lock);
190189
lockdep_set_class(&s->s_umount, &type->s_umount_key);
191-
/*
192-
* The locking rules for s_lock are up to the
193-
* filesystem. For example ext3fs has different
194-
* lock ordering than usbfs:
195-
*/
196-
lockdep_set_class(&s->s_lock, &type->s_lock_key);
197190
/*
198191
* sget() can have s_umount recursion.
199192
*
@@ -394,22 +387,6 @@ bool grab_super_passive(struct super_block *sb)
394387
return false;
395388
}
396389

397-
/*
398-
* Superblock locking. We really ought to get rid of these two.
399-
*/
400-
void lock_super(struct super_block * sb)
401-
{
402-
mutex_lock(&sb->s_lock);
403-
}
404-
405-
void unlock_super(struct super_block * sb)
406-
{
407-
mutex_unlock(&sb->s_lock);
408-
}
409-
410-
EXPORT_SYMBOL(lock_super);
411-
EXPORT_SYMBOL(unlock_super);
412-
413390
/**
414391
* generic_shutdown_super - common helper for ->kill_sb()
415392
* @sb: superblock to kill

‎include/linux/fs.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,6 @@ struct super_block {
15071507
unsigned long s_magic;
15081508
struct dentry *s_root;
15091509
struct rw_semaphore s_umount;
1510-
struct mutex s_lock;
15111510
int s_count;
15121511
atomic_t s_active;
15131512
#ifdef CONFIG_SECURITY

0 commit comments

Comments
 (0)