aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/truncate.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-22 14:23:35 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-22 14:23:35 -0500
commit391f2a16b74b95da2f05a607f53213fc8ed24b8e (patch)
tree93bfd1906778d7ff24f6ce7c03f2e7c0f91caef5 /fs/ext4/truncate.h
parentd5ffdf8b4ac6e6db5702ba31870c476d5fa30660 (diff)
parent68ce7bfcd995a8a393b1b14fa67dbc16fa3dc784 (diff)
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 updates from Ted Ts'o: "Some locking and page fault bug fixes from Jan Kara, some ext4 encryption fixes from me, and Li Xi's Project Quota commits" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: fs: clean up the flags definition in uapi/linux/fs.h ext4: add FS_IOC_FSSETXATTR/FS_IOC_FSGETXATTR interface support ext4: add project quota support ext4: adds project ID support ext4 crypto: simplify interfaces to directory entry insert functions ext4 crypto: add missing locking for keyring_key access ext4: use pre-zeroed blocks for DAX page faults ext4: implement allocation of pre-zeroed blocks ext4: provide ext4_issue_zeroout() ext4: get rid of EXT4_GET_BLOCKS_NO_LOCK flag ext4: document lock ordering ext4: fix races of writeback with punch hole and zero range ext4: fix races between buffered IO and collapse / insert range ext4: move unlocked dio protection from ext4_alloc_file_blocks() ext4: fix races between page faults and hole punching
Diffstat (limited to 'fs/ext4/truncate.h')
-rw-r--r--fs/ext4/truncate.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/truncate.h b/fs/ext4/truncate.h
index 011ba6670d99..c70d06a383e2 100644
--- a/fs/ext4/truncate.h
+++ b/fs/ext4/truncate.h
@@ -10,8 +10,10 @@
10 */ 10 */
11static inline void ext4_truncate_failed_write(struct inode *inode) 11static inline void ext4_truncate_failed_write(struct inode *inode)
12{ 12{
13 down_write(&EXT4_I(inode)->i_mmap_sem);
13 truncate_inode_pages(inode->i_mapping, inode->i_size); 14 truncate_inode_pages(inode->i_mapping, inode->i_size);
14 ext4_truncate(inode); 15 ext4_truncate(inode);
16 up_write(&EXT4_I(inode)->i_mmap_sem);
15} 17}
16 18
17/* 19/*