Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 70683
b: refs/heads/master
c: fb46f34
h: refs/heads/master
i:
  70681: ea69cc0
  70679: 57d95c1
v: v3
  • Loading branch information
Lepton Wu authored and Linus Torvalds committed Oct 17, 2007
1 parent a70ff07 commit 347ce01
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9ec0339d8e22cadf2d9d1b010b51dc53837dfb0
refs/heads/master: fb46f341d9868fe993626536c7449c2a1aec62a3
18 changes: 15 additions & 3 deletions trunk/fs/reiserfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ static int finish_unfinished(struct super_block *s)
{
INITIALIZE_PATH(path);
struct cpu_key max_cpu_key, obj_key;
struct reiserfs_key save_link_key;
struct reiserfs_key save_link_key, last_inode_key;
int retval = 0;
struct item_head *ih;
struct buffer_head *bh;
Expand All @@ -166,6 +166,8 @@ static int finish_unfinished(struct super_block *s)
set_cpu_key_k_offset(&max_cpu_key, ~0U);
max_cpu_key.key_length = 3;

memset(&last_inode_key, 0, sizeof(last_inode_key));

#ifdef CONFIG_QUOTA
/* Needed for iput() to work correctly and not trash data */
if (s->s_flags & MS_ACTIVE) {
Expand Down Expand Up @@ -278,8 +280,18 @@ static int finish_unfinished(struct super_block *s)
REISERFS_I(inode)->i_flags |= i_link_saved_unlink_mask;
/* not completed unlink (rmdir) found */
reiserfs_info(s, "Removing %k..", INODE_PKEY(inode));
/* removal gets completed in iput */
retval = 0;
if (memcmp(&last_inode_key, INODE_PKEY(inode),
sizeof(last_inode_key))){
last_inode_key = *INODE_PKEY(inode);
/* removal gets completed in iput */
retval = 0;
} else {
reiserfs_warning(s, "Dead loop in "
"finish_unfinished detected, "
"just remove save link\n");
retval = remove_save_link_only(s,
&save_link_key, 0);
}
}

iput(inode);
Expand Down

0 comments on commit 347ce01

Please sign in to comment.