aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2014-05-21 13:28:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-06 18:57:29 -0700
commit96c9227eac08cc700b021891a1c6590af8ee63c0 (patch)
treedeba54c6ceda94e30a0410938a26030f00ff670d /lib/mpi/mpi-bit.c
parent196c55ab344602fa0768a6a50b86f63b5744d106 (diff)
reiserfs: call truncate_setsize under tailpack mutex
commit 22e7478ddbcb670e33fab72d0bbe7c394c3a2c84 upstream. Prior to commit 0e4f6a791b1e (Fix reiserfs_file_release()), reiserfs truncates serialized on i_mutex. They mostly still do, with the exception of reiserfs_file_release. That blocks out other writers via the tailpack mutex and the inode openers counter adjusted in reiserfs_file_open. However, NFS will call reiserfs_setattr without having called ->open, so we end up with a race when nfs is calling ->setattr while another process is releasing the file. Ultimately, it triggers the BUG_ON(inode->i_size != new_file_size) check in maybe_indirect_to_direct. The solution is to pull the lock into reiserfs_setattr to encompass the truncate_setsize call as well. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions