From cb50af0f7650723a72c9e5df62461a5395437fbb Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Sun, 9 Jun 2013 01:25:57 +0200 Subject: [PATCH] --- yaml --- r: 376870 b: refs/heads/master c: bbd465df73f0d8ba41b8a0732766a243d0f5b356 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/hpfs/file.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 052efa7a2eea..9ab45a53733e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 81db4dbf592b486ac2bc7cabfb328ee2a6c4725d +refs/heads/master: bbd465df73f0d8ba41b8a0732766a243d0f5b356 diff --git a/trunk/fs/hpfs/file.c b/trunk/fs/hpfs/file.c index 3027f4dbbab5..e4ba5fe4c3b5 100644 --- a/trunk/fs/hpfs/file.c +++ b/trunk/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,