summaryrefslogtreecommitdiffstats
path: root/fs/hpfs/file.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-06-20 21:13:55 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2013-06-20 21:13:55 -0700
commite6bca5a6a8a0cdc41a9e1e3e69bc8476ac6a8ed4 (patch)
tree2651a8a7b81ee71113bdeda8425a2083f2842b20 /fs/hpfs/file.c
parente8747f10ba3f7638b1c1fcab9c66a01733213d45 (diff)
parent7d132055814ef17a6c7b69f342244c410a5e000f (diff)
downloadlinux-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.c4
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,