• Jan Kara's avatar
    reiserfs: Protect dquot_writeback_dquots() by s_umount semaphore · 1e0e653f
    Jan Kara authored
    dquot_writeback_dquots() expects s_umount semaphore to be held to
    protect it from other concurrent quota operations. reiserfs_sync_fs()
    can call dquot_writeback_dquots() without holding s_umount semaphore
    when called from flush_old_commits().
    
    Fix the problem by grabbing s_umount in flush_old_commits(). However we
    have to be careful and use only trylock since reiserfs_cancel_old_sync()
    can be waiting for flush_old_commits() to complete while holding
    s_umount semaphore. Possible postponing of sync work is not a big deal
    though as that is only an opportunistic flush.
    
    Fixes: 9d1ccbe7Reported-by: Jan Beulich's avatarJan Beulich <jbeulich@suse.com>
    Signed-off-by: 's avatarJan Kara <jack@suse.cz>
    1e0e653f
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
README Loading commit data...
acl.h Loading commit data...
bitmap.c Loading commit data...
dir.c Loading commit data...
do_balan.c Loading commit data...
file.c Loading commit data...
fix_node.c Loading commit data...
hashes.c Loading commit data...
ibalance.c Loading commit data...
inode.c Loading commit data...
ioctl.c Loading commit data...
item_ops.c Loading commit data...
journal.c Loading commit data...
lbalance.c Loading commit data...
lock.c Loading commit data...
namei.c Loading commit data...
objectid.c Loading commit data...
prints.c Loading commit data...
procfs.c Loading commit data...
reiserfs.h Loading commit data...
resize.c Loading commit data...
stree.c Loading commit data...
super.c Loading commit data...
tail_conversion.c Loading commit data...
xattr.c Loading commit data...
xattr.h Loading commit data...
xattr_acl.c Loading commit data...
xattr_security.c Loading commit data...
xattr_trusted.c Loading commit data...
xattr_user.c Loading commit data...