UBIFS: correct orphan deletion order

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Friday, August 15, 2008 - 3:00 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f76910...
Commit:     f769108424a19c7758546d1d7d19f098b1a33759
Parent:     7d62ff2c396470bb62a3853f14d3962eac1da974
Author:     Adrian Hunter <ext-adrian.hunter@nokia.com>
AuthorDate: Wed Jul 23 16:55:55 2008 +0300
Committer:  Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
CommitDate: Wed Aug 13 11:32:53 2008 +0300

    UBIFS: correct orphan deletion order
    
    The debug function that checks orphans, does so using the
    TNC mutex. That means it will not see a correct picture
    if the inode is removed from the orphan tree before it is
    removed from TNC.
    
    Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
---
 fs/ubifs/journal.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
index 25de6fd..acdae00 100644
--- a/fs/ubifs/journal.c
+++ b/fs/ubifs/journal.c
@@ -871,10 +871,11 @@ int ubifs_jnl_delete_inode(struct ubifs_info *c, const struct inode *inode)
 		return ubifs_jnl_write_inode(c, inode);
 	}
 
-	ubifs_delete_orphan(c, inode->i_ino);
 	err = ubifs_tnc_remove_ino(c, inode->i_ino);
 	if (err)
 		ubifs_ro_mode(c, err);
+	else
+		ubifs_delete_orphan(c, inode->i_ino);
 	up_read(&c->commit_sem);
 	return err;
 }
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
UBIFS: correct orphan deletion order, Linux Kernel Mailing List..., (Fri Aug 15, 3:00 pm)