mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
nilfs2: fix infinite loop in nilfs_palloc_freev function
After having applied commit 9954e7af14
("nilfs2: add free
entries count only if clear bit operation succeeded"), a free routine
of nilfs came to fall into an infinite loop, outputting the same
message endlessly:
nilfs_palloc_freev: entry number 29497 already freed
nilfs_palloc_freev: entry number 29497 already freed
nilfs_palloc_freev: entry number 29497 already freed
nilfs_palloc_freev: entry number 29497 already freed
nilfs_palloc_freev: entry number 29497 already freed ...
That patch broke the routine so that a loop counter is never updated
in an abnormal state. This fixes the regression.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
This commit is contained in:
parent
693d92a1bb
commit
349dbc3669
@ -646,7 +646,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems)
|
||||
unsigned long group, group_offset;
|
||||
int i, j, n, ret;
|
||||
|
||||
for (i = 0; i < nitems; i += n) {
|
||||
for (i = 0; i < nitems; i = j) {
|
||||
group = nilfs_palloc_group(inode, entry_nrs[i], &group_offset);
|
||||
ret = nilfs_palloc_get_desc_block(inode, group, 0, &desc_bh);
|
||||
if (ret < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user