A few jfs fixes

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEIodevzQLVs53l6BhNqiEXrVAjGQFAl/Xo/YACgkQNqiEXrVA
 jGSxhQ//b9s9DQUW6TNumGl5+zN4AAokiWXNo69fyqVVZMnSO2+QS64aY0bOxQh3
 56pfSul1Ay1gkLw8urlaJ8RZX1SZu+FUkbn8SGgw31ypy9UbqAeq4eT1UgvIUs0L
 COO5fGgpF2M+WGW33RWyWstvZBvldqNzn/I4886fCevZtVmm5hC8yZFvOfMqWyKr
 UnfTDpPlG1aBBcBMJWGPjxuGE0Aqd+WBfElC1gXM6sAcbucdPeLV2DEtrDl1WKDU
 5lkfV2+f+LvfO7ZzHmh3iJg4DCjFTkfP71mi/DX4uRwJrPEEE9SeMQYob4DygZRb
 l14xskFrKvbjRdj+R0HEhyAqiiDFTm8zLPjR3JL3xXFrvypoBzh6r1LI+KaQaIs1
 N7/cUHEyBXv6QXRnnzbAOM0jxQzkNknAxP4IULg7bGA5xm37TP5cc7M6VpaM+rKU
 ZY3Re4ja7adLq8MwvNP4jCUoAmu6B8b7PYESicKglcty+yzm+TzIIIBcZUPXoJQA
 w5U8ZSGqI9uD47DrUR+KwVfGnJwqogyGrhJscgvA4PNnxprF35BShDWSCGjrZIQC
 AQ3bt2BRcZ8Ad8XQWvsgAdhxeUWV22s3Dz6U5gwMxAKVzksVJrPuA6EKMeDlls+w
 cxp6hOMfjU1RGvSCK8nczT0C+EB+LKi6GBvQvGnVS28w7+WeTWY=
 =lMUu
 -----END PGP SIGNATURE-----

Merge tag 'jfs-5.11' of git://github.com/kleikamp/linux-shaggy

Pull jfs updates from David Kleikamp:
 "A few jfs fixes"

* tag 'jfs-5.11' of git://github.com/kleikamp/linux-shaggy:
  jfs: Fix array index bounds check in dbAdjTree
  jfs: Fix memleak in dbAdjCtl
  jfs: delete duplicated words + other fixes
This commit is contained in:
Linus Torvalds 2020-12-15 18:49:45 -08:00
commit 9867cb1fd5
7 changed files with 13 additions and 9 deletions

View file

@ -668,7 +668,7 @@ int dbNextAG(struct inode *ipbmap)
* this does not succeed, we finally try to allocate anywhere
* within the aggregate.
*
* we also try to allocate anywhere within the aggregate for
* we also try to allocate anywhere within the aggregate
* for allocation requests larger than the allocation group
* size or requests that specify no hint value.
*
@ -2549,15 +2549,19 @@ dbAdjCtl(struct bmap * bmp, s64 blkno, int newval, int alloc, int level)
*/
if (oldval == NOFREE) {
rc = dbBackSplit((dmtree_t *) dcp, leafno);
if (rc)
if (rc) {
release_metapage(mp);
return rc;
}
oldval = dcp->stree[ti];
}
dbSplit((dmtree_t *) dcp, leafno, dcp->budmin, newval);
} else {
rc = dbJoin((dmtree_t *) dcp, leafno, newval);
if (rc)
if (rc) {
release_metapage(mp);
return rc;
}
}
/* check if the root of the current dmap control page changed due

View file

@ -183,7 +183,7 @@ typedef union dmtree {
#define dmt_leafidx t1.leafidx
#define dmt_height t1.height
#define dmt_budmin t1.budmin
#define dmt_stree t1.stree
#define dmt_stree t2.stree
/*
* on-disk aggregate disk allocation map descriptor.

View file

@ -575,7 +575,7 @@ extBalloc(struct inode *ip, s64 hint, s64 * nblocks, s64 * blkno)
* blkno - starting block number of the extents current allocation.
* nblks - number of blocks within the extents current allocation.
* newnblks - pointer to a s64 value. on entry, this value is the
* the new desired extent size (number of blocks). on
* new desired extent size (number of blocks). on
* successful exit, this value is set to the extent's actual
* new size (new number of blocks).
* newblkno - the starting block number of the extents new allocation.

View file

@ -5,7 +5,7 @@
#ifndef _H_JFS_EXTENT
#define _H_JFS_EXTENT
/* get block allocation allocation hint as location of disk inode */
/* get block allocation hint as location of disk inode */
#define INOHINT(ip) \
(addressPXD(&(JFS_IP(ip)->ixpxd)) + lengthPXD(&(JFS_IP(ip)->ixpxd)) - 1)

View file

@ -132,7 +132,7 @@ struct logpage {
* (this comment should be rewritten !)
* jfs uses only "after" log records (only a single writer is allowed
* in a page, pages are written to temporary paging space if
* if they must be written to disk before commit, and i/o is
* they must be written to disk before commit, and i/o is
* scheduled for modified pages to their home location after
* the log records containing the after values and the commit
* record is written to the log on disk, undo discards the copy

View file

@ -1474,7 +1474,7 @@ static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
* For the LOG_NOREDOINOEXT record, we need
* to pass the IAG number and inode extent
* index (within that IAG) from which the
* the extent being released. These have been
* extent is being released. These have been
* passed to us in the iplist[1] and iplist[2].
*/
lrd->log.noredoinoext.iagnum =

View file

@ -3684,7 +3684,7 @@ s64 xtTruncate(tid_t tid, struct inode *ip, s64 newsize, int flag)
*
* function:
* Perform truncate to zero length for deleted file, leaving the
* the xtree and working map untouched. This allows the file to
* xtree and working map untouched. This allows the file to
* be accessed via open file handles, while the delete of the file
* is committed to disk.
*