aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r--fs/gfs2/dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 862aa3228f7a..34dc8dfaba12 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -1021,13 +1021,13 @@ static int dir_split_leaf(struct inode *inode, const struct qstr *name)
1021 1021
1022 new->de_inum = dent->de_inum; /* No endian worries */ 1022 new->de_inum = dent->de_inum; /* No endian worries */
1023 new->de_type = dent->de_type; /* No endian worries */ 1023 new->de_type = dent->de_type; /* No endian worries */
1024 nleaf->lf_entries = cpu_to_be16(be16_to_cpu(nleaf->lf_entries)+1); 1024 be16_add_cpu(&nleaf->lf_entries, 1);
1025 1025
1026 dirent_del(dip, obh, prev, dent); 1026 dirent_del(dip, obh, prev, dent);
1027 1027
1028 if (!oleaf->lf_entries) 1028 if (!oleaf->lf_entries)
1029 gfs2_consist_inode(dip); 1029 gfs2_consist_inode(dip);
1030 oleaf->lf_entries = cpu_to_be16(be16_to_cpu(oleaf->lf_entries)-1); 1030 be16_add_cpu(&oleaf->lf_entries, -1);
1031 1031
1032 if (!prev) 1032 if (!prev)
1033 prev = dent; 1033 prev = dent;
@@ -1614,7 +1614,7 @@ int gfs2_dir_add(struct inode *inode, const struct qstr *name,
1614 dent->de_type = cpu_to_be16(type); 1614 dent->de_type = cpu_to_be16(type);
1615 if (ip->i_di.di_flags & GFS2_DIF_EXHASH) { 1615 if (ip->i_di.di_flags & GFS2_DIF_EXHASH) {
1616 leaf = (struct gfs2_leaf *)bh->b_data; 1616 leaf = (struct gfs2_leaf *)bh->b_data;
1617 leaf->lf_entries = cpu_to_be16(be16_to_cpu(leaf->lf_entries) + 1); 1617 be16_add_cpu(&leaf->lf_entries, 1);
1618 } 1618 }
1619 brelse(bh); 1619 brelse(bh);
1620 error = gfs2_meta_inode_buffer(ip, &bh); 1620 error = gfs2_meta_inode_buffer(ip, &bh);