Files
linux/fs
Jeff Mahoney 4660efb843 reiserfs: call truncate_setsize under tailpack mutex
commit 22e7478ddb upstream.

Prior to commit 0e4f6a791b (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>
2014-07-06 18:54:15 -07:00
..
2013-05-07 20:16:25 -07:00
2013-05-07 20:16:25 -07:00
2013-05-07 20:16:25 -07:00
2013-03-12 18:55:21 -07:00
2014-02-13 13:47:59 -08:00
2013-05-24 16:22:51 -07:00
2013-07-13 11:42:26 -07:00
2013-04-29 15:41:42 -04:00
2013-11-13 12:05:31 +09:00
2013-03-23 14:15:31 -07:00
2014-02-13 13:48:00 -08:00
2013-05-07 20:16:25 -07:00
2014-04-03 12:01:05 -07:00
2014-05-06 07:55:28 -07:00
2013-04-29 15:40:23 -04:00
2013-10-05 07:13:09 -07:00
2012-10-22 08:50:37 +03:00
2013-05-07 20:16:25 -07:00
2013-02-22 23:31:31 -05:00
2013-02-22 23:31:31 -05:00
2013-04-17 13:25:09 +01:00
2012-12-20 18:46:29 -05:00
2013-05-31 15:16:33 -04:00
2013-02-22 23:31:31 -05:00
2014-02-13 13:47:59 -08:00
2013-02-26 02:46:08 -05:00
2013-08-04 16:51:15 +08:00