]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext2: Call dquot_writeback_dquots() with s_umount held
authorJan Kara <jack@suse.cz>
Wed, 5 Apr 2017 11:32:52 +0000 (13:32 +0200)
committerJan Kara <jack@suse.cz>
Wed, 5 Apr 2017 12:23:45 +0000 (14:23 +0200)
commit65547661500885dde26ca4a75d4d7f7df587c88e
tree72f05ce433afc3249d1ec242679c4c04d041e9e2
parentab4949640d6674b617b314ad3c2c00353304bab9
ext2: Call dquot_writeback_dquots() with s_umount held

ext2_sync_fs() could be called without s_umount semaphore held when
called through ext2_write_super() from __ext2_write_inode(). This
function then calls dquot_writeback_dquots() which relies on s_umount to
be held for protection against other quota operations.

In fact __ext2_write_inode() does not need all the functionality
ext2_write_super() provides. It is enough to just write the superblock.
So use ext2_sync_super() instead.

Fixes: 9d1ccbe70e0b14545caad12dc73adb3605447df0
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext2/ext2.h
fs/ext2/inode.c
fs/ext2/super.c