aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/journal.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/journal.c')
-rw-r--r--fs/ubifs/journal.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
index 0bcee7d221e8..25de6fde383f 100644
--- a/fs/ubifs/journal.c
+++ b/fs/ubifs/journal.c
@@ -822,7 +822,7 @@ out_free:
822} 822}
823 823
824/** 824/**
825 * ubifs_jnl_write_inode - delete an inode. 825 * ubifs_jnl_delete_inode - delete an inode.
826 * @c: UBIFS file-system description object 826 * @c: UBIFS file-system description object
827 * @inode: inode to delete 827 * @inode: inode to delete
828 * 828 *
@@ -831,21 +831,21 @@ out_free:
831 * journal. 831 * journal.
832 * 832 *
833 * When regular file inodes are unlinked or a directory inode is removed, the 833 * When regular file inodes are unlinked or a directory inode is removed, the
834 * 'ubifs_jnl_update()' function write corresponding deletion inode and 834 * 'ubifs_jnl_update()' function writes a corresponding deletion inode and
835 * direntry to the media, and adds the inode to orphans. After this, when the 835 * direntry to the media, and adds the inode to orphans. After this, when the
836 * last reference to this inode has been dropped, this function is called. In 836 * last reference to this inode has been dropped, this function is called. In
837 * general, it has to write one more deletion inode to the media, because if 837 * general, it has to write one more deletion inode to the media, because if
838 * a commit happened between 'ubifs_jnl_update()' and 838 * a commit happened between 'ubifs_jnl_update()' and
839 * 'ubifs_jnl_delete_inode()', the deletion inode is not in the journal 839 * 'ubifs_jnl_delete_inode()', the deletion inode is not in the journal
840 * anymore, and in fact it might be not on the flash anymore, becouse it might 840 * anymore, and in fact it might not be on the flash anymore, because it might
841 * have been garbage-collected already. And for optimization reasond UBIFS does 841 * have been garbage-collected already. And for optimization reasons UBIFS does
842 * not read the orphan area if it has been unmounted cleanly, so it would have 842 * not read the orphan area if it has been unmounted cleanly, so it would have
843 * no indication in the journal that there is a deleted inode which has to be 843 * no indication in the journal that there is a deleted inode which has to be
844 * removed from TNC. 844 * removed from TNC.
845 * 845 *
846 * However, if there was no commit between 'ubifs_jnl_update()' and 846 * However, if there was no commit between 'ubifs_jnl_update()' and
847 * 'ubifs_jnl_delete_inode()', then there is no need to write the deletion 847 * 'ubifs_jnl_delete_inode()', then there is no need to write the deletion
848 * inode to the media for the second time. And this is quite typical case. 848 * inode to the media for the second time. And this is quite a typical case.
849 * 849 *
850 * This function returns zero in case of success and a negative error code in 850 * This function returns zero in case of success and a negative error code in
851 * case of failure. 851 * case of failure.