mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-04-01 12:04:08 +00:00
In get_super() and user_get_super() restarts are unconditional
If superblock had been still alive, we would've returned it... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
1494583de5
commit
df40c01a92
1 changed files with 10 additions and 8 deletions
10
fs/super.c
10
fs/super.c
|
@ -441,12 +441,13 @@ rescan:
|
|||
sb->s_count++;
|
||||
spin_unlock(&sb_lock);
|
||||
down_read(&sb->s_umount);
|
||||
/* still alive? */
|
||||
if (sb->s_root)
|
||||
return sb;
|
||||
up_read(&sb->s_umount);
|
||||
/* restart only when sb is no longer on the list */
|
||||
/* nope, got unmounted */
|
||||
spin_lock(&sb_lock);
|
||||
if (__put_super_and_need_restart(sb))
|
||||
__put_super(sb);
|
||||
goto rescan;
|
||||
}
|
||||
}
|
||||
|
@ -500,12 +501,13 @@ rescan:
|
|||
sb->s_count++;
|
||||
spin_unlock(&sb_lock);
|
||||
down_read(&sb->s_umount);
|
||||
/* still alive? */
|
||||
if (sb->s_root)
|
||||
return sb;
|
||||
up_read(&sb->s_umount);
|
||||
/* restart only when sb is no longer on the list */
|
||||
/* nope, got unmounted */
|
||||
spin_lock(&sb_lock);
|
||||
if (__put_super_and_need_restart(sb))
|
||||
__put_super(sb);
|
||||
goto rescan;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue