[GFS2] Fix bug which was causing postmark to fail
A typo in the directory code was causing postmark to fail
somewhere in the allocation code, since it was unable to
find newly allocated directory leaf blocks under certain
circumstances.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 01f89c7..fe6c5ad 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -1511,7 +1511,7 @@
brelse(obh);
return -ENOSPC;
}
- oleaf->lf_next = cpu_to_be64(bn);
+ oleaf->lf_next = cpu_to_be64(bh->b_blocknr);
brelse(bh);
brelse(obh);
@@ -1950,8 +1950,7 @@
* Returns: 1 if alloc required, 0 if not, -ve on error
*/
-int gfs2_diradd_alloc_required(struct inode *inode,
- const struct qstr *name)
+int gfs2_diradd_alloc_required(struct inode *inode, const struct qstr *name)
{
struct gfs2_dirent *dent;
struct buffer_head *bh;