diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2013-06-20 21:13:55 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-06-20 21:13:55 -0700 |
commit | e6bca5a6a8a0cdc41a9e1e3e69bc8476ac6a8ed4 (patch) | |
tree | 2651a8a7b81ee71113bdeda8425a2083f2842b20 /fs/hpfs/file.c | |
parent | e8747f10ba3f7638b1c1fcab9c66a01733213d45 (diff) | |
parent | 7d132055814ef17a6c7b69f342244c410a5e000f (diff) | |
download | linux-stable-e6bca5a6a8a0cdc41a9e1e3e69bc8476ac6a8ed4.tar.gz linux-stable-e6bca5a6a8a0cdc41a9e1e3e69bc8476ac6a8ed4.tar.bz2 linux-stable-e6bca5a6a8a0cdc41a9e1e3e69bc8476ac6a8ed4.zip |
Merge tag 'v3.10-rc6' into x86/cleanups
Linux 3.10-rc6
We need a change that is the mainline tree for further work.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'fs/hpfs/file.c')
-rw-r--r-- | fs/hpfs/file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c index 3027f4dbbab5..e4ba5fe4c3b5 100644 --- a/fs/hpfs/file.c +++ b/fs/hpfs/file.c @@ -109,10 +109,14 @@ static void hpfs_write_failed(struct address_space *mapping, loff_t to) { struct inode *inode = mapping->host; + hpfs_lock(inode->i_sb); + if (to > inode->i_size) { truncate_pagecache(inode, to, inode->i_size); hpfs_truncate(inode); } + + hpfs_unlock(inode->i_sb); } static int hpfs_write_begin(struct file *file, struct address_space *mapping, |