]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: Use correct locking for ext4_end_io_nolock()
authorTao Ma <boyu.mt@taobao.com>
Sun, 30 Oct 2011 22:26:08 +0000 (18:26 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 30 Oct 2011 22:26:08 +0000 (18:26 -0400)
commita16ed3dcbdd8ded6d18de11ca74b3471eb2b1882
treec3840b588dc51ae8958ff25b950a2eaba0324127
parentc054fd6d8a6af758be46eba716ca089f8b5aef29
ext4: Use correct locking for ext4_end_io_nolock()

We must hold i_completed_io_lock when manipulating anything on the
i_completed_io_list linked list.  This includes io->lock, which we
were checking in ext4_end_io_nolock().

So move this check to ext4_end_io_work().  This also has the bonus of
avoiding extra work if it is already done without needing to take the
mutex.

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/fsync.c
fs/ext4/page-io.c