Skip to content

Commit 31f48fc

Browse files
committed
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull isofs and reiserfs fixes from Jan Kara: "A reiserfs and an isofs fix. They arrived after I sent you my first pull request and I don't want to delay them unnecessarily till rc2" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: isofs: Fix infinite looping over CE entries reiserfs: destroy allocated commit workqueue
2 parents 0b233b7 + f54e18f commit 31f48fc

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

fs/isofs/rock.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ struct rock_state {
3030
int cont_size;
3131
int cont_extent;
3232
int cont_offset;
33+
int cont_loops;
3334
struct inode *inode;
3435
};
3536

@@ -73,6 +74,9 @@ static void init_rock_state(struct rock_state *rs, struct inode *inode)
7374
rs->inode = inode;
7475
}
7576

77+
/* Maximum number of Rock Ridge continuation entries */
78+
#define RR_MAX_CE_ENTRIES 32
79+
7680
/*
7781
* Returns 0 if the caller should continue scanning, 1 if the scan must end
7882
* and -ve on error.
@@ -105,6 +109,8 @@ static int rock_continue(struct rock_state *rs)
105109
goto out;
106110
}
107111
ret = -EIO;
112+
if (++rs->cont_loops >= RR_MAX_CE_ENTRIES)
113+
goto out;
108114
bh = sb_bread(rs->inode->i_sb, rs->cont_extent);
109115
if (bh) {
110116
memcpy(rs->buffer, bh->b_data + rs->cont_offset,

fs/reiserfs/super.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,6 +2172,9 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
21722172
reiserfs_write_unlock(s);
21732173
}
21742174

2175+
if (sbi->commit_wq)
2176+
destroy_workqueue(sbi->commit_wq);
2177+
21752178
cancel_delayed_work_sync(&REISERFS_SB(s)->old_work);
21762179

21772180
reiserfs_free_bitmap_cache(s);

0 commit comments

Comments
 (0)