Skip to contentSkip to conversation

Fixed a bug that cp count get wrong on errors when deleting series of cp

PATCH In review Jiro SEKIBA 2 participants 2 messages Jul 3, 2009 1 message not in the archive NILFS2 filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixed a bug that cp count get wrong on errors when deleting series of cp

Hi,

This is a patch to fix a bug that checkpoint count get wrong on errors when deleting series of checkpoints.

Thanks,

Regards

Signature · 7 lines
Jiro SEKIBA <[email protected]>

 Signed-off-by: Jiro SEKIBA <[email protected]>

---
 fs/nilfs2/cpfile.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
fs/nilfs2/cpfile.c +2 -3
index 7d49813..aec942c 100644
@@ -307,7 +307,7 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,
 		ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, 0, &cp_bh);
 		if (ret < 0) {
 			if (ret != -ENOENT)
-				goto out_header;
+				break;
 			/* skip hole */
 			ret = 0;
 			continue;
@@ -340,7 +340,7 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,
 					continue;
 				printk(KERN_ERR "%s: cannot delete block\n",
 				       __func__);
-				goto out_header;
+				break;
 			}
 		}
 
@@ -358,7 +358,6 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,
 		kunmap_atomic(kaddr, KM_USER0);
 	}
 
- out_header:
 	brelse(header_bh);
 
  out_sem:
Signature · 1 line
1.5.6.5

A message that is not in the archive (sent off-list or not yet received): 87zlbmxq4e.wl%[email protected]

#2 lore raw

Hi Sekiba-san,

Quoted 12 lines · Jiro SEKIBA

Hi,

This is a patch to fix a bug that checkpoint count get wrong on errors when deleting series of checkpoints.

Thanks,

Regards

Signature · 3 lines
Jiro SEKIBA <[email protected]>

 Signed-off-by: Jiro SEKIBA <[email protected]>

Thank you for sending this!

This patch fixes possible mismatch between the number of checkpoints and the count stored in the header block of cpfile.

Later, I will apply this to a series for 2.6.31-rc, and send it to Linus before 2.6.31-rc3 or so.

Regards,
Ryusuke Konishi

Quoted 42 lines
---
 fs/nilfs2/cpfile.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
fs/nilfs2/cpfile.c +2 -3
index 7d49813..aec942c 100644
@@ -307,7 +307,7 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,
 		ret = nilfs_cpfile_get_checkpoint_block(cpfile, cno, 0, &cp_bh);
 		if (ret < 0) {
 			if (ret != -ENOENT)
-				goto out_header;
+				break;
 			/* skip hole */
 			ret = 0;
 			continue;
@@ -340,7 +340,7 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,
 					continue;
 				printk(KERN_ERR "%s: cannot delete block\n",
 				       __func__);
-				goto out_header;
+				break;
 			}
 		}
 
@@ -358,7 +358,6 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile,
 		kunmap_atomic(kaddr, KM_USER0);
 	}
 
- out_header:
 	brelse(header_bh);
 
  out_sem:
Signature · 7 lines
1.5.6.5


_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users