ufs: restore proper tail allocation
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 8 Jun 2017 06:42:03 +0000 (02:42 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 9 Jun 2017 20:28:01 +0000 (16:28 -0400)
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ufs/inode.c

index 7e41aee7b69a660914e7cb26765714746929a306..feb5f280db09f2dcf16c863a52d916bbfbb5bef3 100644 (file)
@@ -284,7 +284,7 @@ ufs_inode_getfrag(struct inode *inode, unsigned index,
                        goal += uspi->s_fpb;
        }
        tmp = ufs_new_fragments(inode, p, ufs_blknum(new_fragment),
-                               goal, uspi->s_fpb, err, locked_page);
+                               goal, nfrags, err, locked_page);
 
        if (!tmp) {
                *err = -ENOSPC;