Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262103
b: refs/heads/master
c: afb8617
h: refs/heads/master
i:
  262101: 3b4519f
  262099: 97f8c21
  262095: 0a6fc1d
v: v3
  • Loading branch information
Lukas Czerner authored and Theodore Ts'o committed Jul 11, 2011
1 parent b3d44c1 commit ec39508
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 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: caaf7a29d31da21bb8d8200d5e42d1c93d3c6e00
refs/heads/master: afb86178cb9b6a7329cf8709aa210fb0a245b606
17 changes: 5 additions & 12 deletions trunk/fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1989,18 +1989,11 @@ int ext4_orphan_add(handle_t *handle, struct inode *inode)
if (!list_empty(&EXT4_I(inode)->i_orphan))
goto out_unlock;

/* Orphan handling is only valid for files with data blocks
* being truncated, or files being unlinked. */

/* @@@ FIXME: Observation from aviro:
* I think I can trigger J_ASSERT in ext4_orphan_add(). We block
* here (on s_orphan_lock), so race with ext4_link() which might bump
* ->i_nlink. For, say it, character device. Not a regular file,
* not a directory, not a symlink and ->i_nlink > 0.
*
* tytso, 4/25/2009: I'm not sure how that could happen;
* shouldn't the fs core protect us from these sort of
* unlink()/link() races?
/*
* Orphan handling is only valid for files with data blocks
* being truncated, or files being unlinked. Note that we either
* hold i_mutex, or the inode can not be referenced from outside,
* so i_nlink should not be bumped due to race
*/
J_ASSERT((S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
S_ISLNK(inode->i_mode)) || inode->i_nlink == 0);
Expand Down

0 comments on commit ec39508

Please sign in to comment.