Searched hist:b12cea91 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/ |
H A D | namespace.c | b12cea91 Fri Mar 18 07:55:38 CDT 2011 Al Viro <viro@zeniv.linux.org.uk> change the locking order for namespace_sem
Have it nested inside ->i_mutex. Instead of using follow_down() under namespace_sem, followed by grabbing i_mutex and checking that mountpoint to be is not dead, do the following: grab i_mutex check that it's not dead grab namespace_sem see if anything is mounted there if not, we've won otherwise drop locks put_path on what we had replace with what's mounted retry everything with new mountpoint to be
New helper (lock_mount()) does that. do_add_mount(), do_move_mount(), do_loopback() and pivot_root() switched to it; in case of the last two that eliminates a race we used to have - original code didn't do follow_down().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> b12cea91 Fri Mar 18 07:55:38 CDT 2011 Al Viro <viro@zeniv.linux.org.uk> change the locking order for namespace_sem Have it nested inside ->i_mutex. Instead of using follow_down() under namespace_sem, followed by grabbing i_mutex and checking that mountpoint to be is not dead, do the following: grab i_mutex check that it's not dead grab namespace_sem see if anything is mounted there if not, we've won otherwise drop locks put_path on what we had replace with what's mounted retry everything with new mountpoint to be New helper (lock_mount()) does that. do_add_mount(), do_move_mount(), do_loopback() and pivot_root() switched to it; in case of the last two that eliminates a race we used to have - original code didn't do follow_down(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|