diff options
-rw-r--r-- | fs/jfs/jfs_dmap.c | 2 | ||||
-rw-r--r-- | fs/jfs/jfs_dtree.c | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index 2967b7393415..038d8b76d113 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c | |||
@@ -125,7 +125,7 @@ static int dbGetL2AGSize(s64 nblocks); | |||
125 | * into the table, with the table elements yielding the maximum | 125 | * into the table, with the table elements yielding the maximum |
126 | * binary buddy of free bits within the character. | 126 | * binary buddy of free bits within the character. |
127 | */ | 127 | */ |
128 | static s8 budtab[256] = { | 128 | static const s8 budtab[256] = { |
129 | 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | 129 | 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
130 | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 130 | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
131 | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | 131 | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c index 404f33eae507..6c3f08319846 100644 --- a/fs/jfs/jfs_dtree.c +++ b/fs/jfs/jfs_dtree.c | |||
@@ -1005,6 +1005,9 @@ static int dtSplitUp(tid_t tid, | |||
1005 | 1005 | ||
1006 | DT_PUTPAGE(smp); | 1006 | DT_PUTPAGE(smp); |
1007 | 1007 | ||
1008 | if (!DO_INDEX(ip)) | ||
1009 | ip->i_size = xlen << sbi->l2bsize; | ||
1010 | |||
1008 | goto freeKeyName; | 1011 | goto freeKeyName; |
1009 | } | 1012 | } |
1010 | 1013 | ||
@@ -1055,7 +1058,9 @@ static int dtSplitUp(tid_t tid, | |||
1055 | xaddr = addressPXD(pxd) + xlen; | 1058 | xaddr = addressPXD(pxd) + xlen; |
1056 | dbFree(ip, xaddr, (s64) n); | 1059 | dbFree(ip, xaddr, (s64) n); |
1057 | } | 1060 | } |
1058 | } | 1061 | } else if (!DO_INDEX(ip)) |
1062 | ip->i_size = lengthPXD(pxd) << sbi->l2bsize; | ||
1063 | |||
1059 | 1064 | ||
1060 | extendOut: | 1065 | extendOut: |
1061 | DT_PUTPAGE(smp); | 1066 | DT_PUTPAGE(smp); |
@@ -1098,6 +1103,9 @@ static int dtSplitUp(tid_t tid, | |||
1098 | goto splitOut; | 1103 | goto splitOut; |
1099 | } | 1104 | } |
1100 | 1105 | ||
1106 | if (!DO_INDEX(ip)) | ||
1107 | ip->i_size += PSIZE; | ||
1108 | |||
1101 | /* | 1109 | /* |
1102 | * propagate up the router entry for the leaf page just split | 1110 | * propagate up the router entry for the leaf page just split |
1103 | * | 1111 | * |
@@ -2424,6 +2432,9 @@ static int dtDeleteUp(tid_t tid, struct inode *ip, | |||
2424 | break; | 2432 | break; |
2425 | } | 2433 | } |
2426 | 2434 | ||
2435 | if (!DO_INDEX(ip)) | ||
2436 | ip->i_size -= PSIZE; | ||
2437 | |||
2427 | return 0; | 2438 | return 0; |
2428 | } | 2439 | } |
2429 | 2440 | ||