• Jan Kara's avatar
    [PATCH] quota umount race fix · 84f308c2
    Jan Kara authored
    Fix possible races between umount and quota on/off.
    
    Finally I decided to take a reference to vfsmount during vfs_quota_on() and
    to drop it after the final cleanup in the vfs_quota_off().  This way we
    should be all the time guarded against umount.  This way was protected also
    the old code which used filp_open() for opening quota files.  I was also
    thinking about other ways of protection but there would be always a window
    (provided I don't want to play much with namespace locks) where
    vfs_quota_on() could be called while umount() is in progress resulting in
    the "Busy inodes after unmount" messages...
    
    Get a reference to vfsmount during quotaon() so that we are guarded against
    umount (as was the old code using filp_open()).
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    84f308c2
dquot.c 51.2 KB