mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-05 00:07:48 -04:00
Merge tag 'jfs-7.0' of github.com:kleikamp/linux-shaggy
Pull jfs updates from Dave Kleikamp: "Just a handful of minor jfs fixes" * tag 'jfs-7.0' of github.com:kleikamp/linux-shaggy: jfs: avoid -Wtautological-constant-out-of-range-compare warning jfs: Add missing set_freezable() for freezable kthread jfs: nlink overflow in jfs_rename
This commit is contained in:
@@ -2903,7 +2903,7 @@ int jfs_readdir(struct file *file, struct dir_context *ctx)
|
||||
stbl = DT_GETSTBL(p);
|
||||
|
||||
for (i = index; i < p->header.nextindex; i++) {
|
||||
if (stbl[i] < 0 || stbl[i] >= DTPAGEMAXSLOT) {
|
||||
if (stbl[i] < 0) {
|
||||
jfs_err("JFS: Invalid stbl[%d] = %d for inode %ld, block = %lld",
|
||||
i, stbl[i], (long)ip->i_ino, (long long)bn);
|
||||
free_page(dirent_buf);
|
||||
@@ -3108,7 +3108,7 @@ static int dtReadFirst(struct inode *ip, struct btstack * btstack)
|
||||
/* get the leftmost entry */
|
||||
stbl = DT_GETSTBL(p);
|
||||
|
||||
if (stbl[0] < 0 || stbl[0] >= DTPAGEMAXSLOT) {
|
||||
if (stbl[0] < 0) {
|
||||
DT_PUTPAGE(mp);
|
||||
jfs_error(ip->i_sb, "stbl[0] out of bound\n");
|
||||
return -EIO;
|
||||
|
||||
@@ -2311,6 +2311,7 @@ int jfsIOWait(void *arg)
|
||||
{
|
||||
struct lbuf *bp;
|
||||
|
||||
set_freezable();
|
||||
do {
|
||||
spin_lock_irq(&log_redrive_lock);
|
||||
while ((bp = log_redrive_list)) {
|
||||
|
||||
@@ -1229,7 +1229,7 @@ static int jfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
jfs_err("jfs_rename: dtInsert returned -EIO");
|
||||
goto out_tx;
|
||||
}
|
||||
if (S_ISDIR(old_ip->i_mode))
|
||||
if (S_ISDIR(old_ip->i_mode) && old_dir != new_dir)
|
||||
inc_nlink(new_dir);
|
||||
}
|
||||
/*
|
||||
@@ -1245,7 +1245,9 @@ static int jfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
|
||||
goto out_tx;
|
||||
}
|
||||
if (S_ISDIR(old_ip->i_mode)) {
|
||||
drop_nlink(old_dir);
|
||||
if (new_ip || old_dir != new_dir)
|
||||
drop_nlink(old_dir);
|
||||
|
||||
if (old_dir != new_dir) {
|
||||
/*
|
||||
* Change inode number of parent for moved directory
|
||||
|
||||
Reference in New Issue
Block a user