Whamcloud - gitweb
LU-5771 ldiskfs: cleanup orphan inode in error path
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel6.3 / ext4-drop-inode-from-orphan-list-if-ext4_delete_inode-fails.patch
1 commit 4538821993f4486c76090dfb377c60c0a0e71ba3
2 Author: Theodore Ts'o <tytso@mit.edu>
3 Date:   Thu Jul 29 15:06:10 2010 -0400
4
5     ext4: drop inode from orphan list if ext4_delete_inode() fails
6     
7     There were some error paths in ext4_delete_inode() which was not
8     dropping the inode from the orphan list.  This could lead to a BUG_ON
9     on umount when the orphan list is discovered to be non-empty.
10     
11 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 Signed-off-by: Wang Shilong <wshilong@ddn.com>
13 --- linux-stage.orig/fs/ext4/inode.c    2014-10-20 20:13:39.689001531 +0800
14 +++ linux-stage/fs/ext4/inode.c 2014-10-20 20:12:14.224997168 +0800
15 @@ -279,6 +279,7 @@
16                                      "couldn't extend journal (err %d)", err);
17                 stop_handle:
18                         ext4_journal_stop(handle);
19 +                       ext4_orphan_del(NULL, inode);
20                         sb_end_intwrite(inode->i_sb);
21                         goto no_delete;
22                 }