Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88221
b: refs/heads/master
c: 76b0c26
h: refs/heads/master
i:
  88219: 44f354f
v: v3
  • Loading branch information
Roman Zippel authored and Linus Torvalds committed Apr 10, 2008
1 parent c9d897a commit d6903ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 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: f4be31ec9690cfe6e94fcbed6ae60a6a38b3c3ed
refs/heads/master: 76b0c26af2736b7e5b87e6ed7ab63901483d5736
23 changes: 15 additions & 8 deletions trunk/fs/hfsplus/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,16 +340,23 @@ static int hfsplus_unlink(struct inode *dir, struct dentry *dentry)

if (inode->i_nlink > 0)
drop_nlink(inode);
hfsplus_delete_inode(inode);
if (inode->i_ino != cnid && !inode->i_nlink) {
if (!atomic_read(&HFSPLUS_I(inode).opencnt)) {
res = hfsplus_delete_cat(inode->i_ino, HFSPLUS_SB(sb).hidden_dir, NULL);
if (!res)
hfsplus_delete_inode(inode);
if (inode->i_ino == cnid)
clear_nlink(inode);
if (!inode->i_nlink) {
if (inode->i_ino != cnid) {
HFSPLUS_SB(sb).file_count--;
if (!atomic_read(&HFSPLUS_I(inode).opencnt)) {
res = hfsplus_delete_cat(inode->i_ino,
HFSPLUS_SB(sb).hidden_dir,
NULL);
if (!res)
hfsplus_delete_inode(inode);
} else
inode->i_flags |= S_DEAD;
} else
inode->i_flags |= S_DEAD;
hfsplus_delete_inode(inode);
} else
clear_nlink(inode);
HFSPLUS_SB(sb).file_count--;
inode->i_ctime = CURRENT_TIME_SEC;
mark_inode_dirty(inode);

Expand Down

0 comments on commit d6903ec

Please sign in to comment.