diff options
Diffstat (limited to 'fs/jfs/jfs_imap.c')
-rw-r--r-- | fs/jfs/jfs_imap.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index 0533e8f3d19e..b78b2f978f04 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c | |||
@@ -397,7 +397,7 @@ int diRead(struct inode *ip) | |||
397 | release_metapage(mp); | 397 | release_metapage(mp); |
398 | 398 | ||
399 | /* set the ag for the inode */ | 399 | /* set the ag for the inode */ |
400 | JFS_IP(ip)->agno = BLKTOAG(agstart, sbi); | 400 | JFS_IP(ip)->agstart = agstart; |
401 | JFS_IP(ip)->active_ag = -1; | 401 | JFS_IP(ip)->active_ag = -1; |
402 | 402 | ||
403 | return (rc); | 403 | return (rc); |
@@ -901,7 +901,7 @@ int diFree(struct inode *ip) | |||
901 | 901 | ||
902 | /* get the allocation group for this ino. | 902 | /* get the allocation group for this ino. |
903 | */ | 903 | */ |
904 | agno = JFS_IP(ip)->agno; | 904 | agno = BLKTOAG(JFS_IP(ip)->agstart, JFS_SBI(ip->i_sb)); |
905 | 905 | ||
906 | /* Lock the AG specific inode map information | 906 | /* Lock the AG specific inode map information |
907 | */ | 907 | */ |
@@ -1315,12 +1315,11 @@ int diFree(struct inode *ip) | |||
1315 | static inline void | 1315 | static inline void |
1316 | diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp) | 1316 | diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp) |
1317 | { | 1317 | { |
1318 | struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb); | ||
1319 | struct jfs_inode_info *jfs_ip = JFS_IP(ip); | 1318 | struct jfs_inode_info *jfs_ip = JFS_IP(ip); |
1320 | 1319 | ||
1321 | ip->i_ino = (iagno << L2INOSPERIAG) + ino; | 1320 | ip->i_ino = (iagno << L2INOSPERIAG) + ino; |
1322 | jfs_ip->ixpxd = iagp->inoext[extno]; | 1321 | jfs_ip->ixpxd = iagp->inoext[extno]; |
1323 | jfs_ip->agno = BLKTOAG(le64_to_cpu(iagp->agstart), sbi); | 1322 | jfs_ip->agstart = le64_to_cpu(iagp->agstart); |
1324 | jfs_ip->active_ag = -1; | 1323 | jfs_ip->active_ag = -1; |
1325 | } | 1324 | } |
1326 | 1325 | ||
@@ -1379,7 +1378,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip) | |||
1379 | */ | 1378 | */ |
1380 | 1379 | ||
1381 | /* get the ag number of this iag */ | 1380 | /* get the ag number of this iag */ |
1382 | agno = JFS_IP(pip)->agno; | 1381 | agno = BLKTOAG(JFS_IP(pip)->agstart, JFS_SBI(pip->i_sb)); |
1383 | 1382 | ||
1384 | if (atomic_read(&JFS_SBI(pip->i_sb)->bmap->db_active[agno])) { | 1383 | if (atomic_read(&JFS_SBI(pip->i_sb)->bmap->db_active[agno])) { |
1385 | /* | 1384 | /* |