diff options
author | Theodore Ts'o <tytso@mit.edu> | 2017-01-11 22:14:49 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-01-11 22:14:49 -0500 |
commit | b907f2d5194c2636623415d89cfb91d692af0629 (patch) | |
tree | 9ee344855c6b41d9a3641d7ac5aa6a3dcb363ae4 /fs/ext4/inode.c | |
parent | c755e251357a0cee0679081f08c3f4ba797a8009 (diff) | |
download | op-kernel-dev-b907f2d5194c2636623415d89cfb91d692af0629.zip op-kernel-dev-b907f2d5194c2636623415d89cfb91d692af0629.tar.gz |
ext4: avoid calling ext4_mark_inode_dirty() under unneeded semaphores
There is no need to call ext4_mark_inode_dirty while holding xattr_sem
or i_data_sem, so where it's easy to avoid it, move it out from the
critical region.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 88d57af..86dde06 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2464,8 +2464,8 @@ update_disksize: disksize = i_size; if (disksize > EXT4_I(inode)->i_disksize) EXT4_I(inode)->i_disksize = disksize; - err2 = ext4_mark_inode_dirty(handle, inode); up_write(&EXT4_I(inode)->i_data_sem); + err2 = ext4_mark_inode_dirty(handle, inode); if (err2) ext4_error(inode->i_sb, "Failed to mark inode %lu dirty", |