summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-06-08 23:27:12 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-14 13:16:24 +0200
commit34aa71cbd4085fe6089f8686a6ae449aaf36b4a0 (patch)
tree2a9cf9901866a0d1e51c258f5904ac31fb6ca8f1
parentd6bd1e7ec7d85321b4449c39b9ab749013fddf03 (diff)
downloadlinux-stable-34aa71cbd4085fe6089f8686a6ae449aaf36b4a0.tar.gz
linux-stable-34aa71cbd4085fe6089f8686a6ae449aaf36b4a0.tar.bz2
linux-stable-34aa71cbd4085fe6089f8686a6ae449aaf36b4a0.zip
ufs_extend_tail(): fix the braino in calling conventions of ufs_new_fragments()
commit 940ef1a0ed939c2ca029fca715e25e7778ce1e34 upstream. ... and it really needs splitting into "new" and "extend" cases, but that's for later Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/ufs/inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index d7b553300c85..2ceccec0b609 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -235,7 +235,8 @@ ufs_extend_tail(struct inode *inode, u64 writes_to,
p = ufs_get_direct_data_ptr(uspi, ufsi, block);
tmp = ufs_new_fragments(inode, p, lastfrag, ufs_data_ptr_to_cpu(sb, p),
- new_size, err, locked_page);
+ new_size - (lastfrag & uspi->s_fpbmask), err,
+ locked_page);
return tmp != 0;
}