Searched hist:e59399d0102c1813cec48db5cebe1750313f88a0 (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/fs/nilfs2/ |
H A D | the_nilfs.h | diff e59399d0102c1813cec48db5cebe1750313f88a0 Sun Jun 07 11:39:32 CDT 2009 Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> nilfs2: correct exclusion control in nilfs_remount function
nilfs_remount() changes mount state of a superblock instance. Even though nilfs accesses other superblock instances during mount or remount, the mount state was not properly protected in nilfs_remount().
Moreover, nilfs_remount() has a lock order reversal problem; nilfs_get_sb() holds:
1. bdev->bd_mount_sem 2. sb->s_umount (sget acquires)
and nilfs_remount() holds:
1. sb->s_umount (locked by the caller in vfs) 2. bdev->bd_mount_sem
To avoid these problems, this patch divides a semaphore protecting super block instances from nilfs->ns_sem, and applies it to the mount state protection in nilfs_remount().
With this change, bd_mount_sem use is removed from nilfs_remount() and the lock order reversal will be resolved. And the new rw-semaphore, nilfs->ns_super_sem will properly protect the mount state except the modification from nilfs_error function.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
H A D | the_nilfs.c | diff e59399d0102c1813cec48db5cebe1750313f88a0 Sun Jun 07 11:39:32 CDT 2009 Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> nilfs2: correct exclusion control in nilfs_remount function
nilfs_remount() changes mount state of a superblock instance. Even though nilfs accesses other superblock instances during mount or remount, the mount state was not properly protected in nilfs_remount().
Moreover, nilfs_remount() has a lock order reversal problem; nilfs_get_sb() holds:
1. bdev->bd_mount_sem 2. sb->s_umount (sget acquires)
and nilfs_remount() holds:
1. sb->s_umount (locked by the caller in vfs) 2. bdev->bd_mount_sem
To avoid these problems, this patch divides a semaphore protecting super block instances from nilfs->ns_sem, and applies it to the mount state protection in nilfs_remount().
With this change, bd_mount_sem use is removed from nilfs_remount() and the lock order reversal will be resolved. And the new rw-semaphore, nilfs->ns_super_sem will properly protect the mount state except the modification from nilfs_error function.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
H A D | super.c | diff e59399d0102c1813cec48db5cebe1750313f88a0 Sun Jun 07 11:39:32 CDT 2009 Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> nilfs2: correct exclusion control in nilfs_remount function
nilfs_remount() changes mount state of a superblock instance. Even though nilfs accesses other superblock instances during mount or remount, the mount state was not properly protected in nilfs_remount().
Moreover, nilfs_remount() has a lock order reversal problem; nilfs_get_sb() holds:
1. bdev->bd_mount_sem 2. sb->s_umount (sget acquires)
and nilfs_remount() holds:
1. sb->s_umount (locked by the caller in vfs) 2. bdev->bd_mount_sem
To avoid these problems, this patch divides a semaphore protecting super block instances from nilfs->ns_sem, and applies it to the mount state protection in nilfs_remount().
With this change, bd_mount_sem use is removed from nilfs_remount() and the lock order reversal will be resolved. And the new rw-semaphore, nilfs->ns_super_sem will properly protect the mount state except the modification from nilfs_error function.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|