author: Al Viro <viro@ZenIV.linux.org.uk> 2015-09-09 10:16:39 +0100
committer: Linus Torvalds <torvalds@linux-foundation.org> 2015-09-09 10:43:12 -0700
commit: bd2843fe1f29f6145c623ae9390f144cefaa611d
parent: daf0e1ed578f65e8395102549e135887e6661860
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index fb8b54eb77c5..dc5fae601c24 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -417,14 +417,14 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
if (oldcount == 0) {
result = ufs_alloc_fragments (inode, cgno, goal, count, err);
if (result) {
+ ufs_clear_frags(inode, result + oldcount,
+ newcount - oldcount, locked_page != NULL);
write_seqlock(&UFS_I(inode)->meta_lock);
ufs_cpu_to_data_ptr(sb, p, result);
write_sequnlock(&UFS_I(inode)->meta_lock);
*err = 0;
UFS_I(inode)->i_lastfrag =
max(UFS_I(inode)->i_lastfrag, fragment + count);
- ufs_clear_frags(inode, result + oldcount,
- newcount - oldcount, locked_page != NULL);
}
mutex_unlock(&UFS_SB(sb)->s_lock);
UFSD("EXIT, result %llu\n", (unsigned long long)result);