Преглед изворни кода

ext4: explicitly remove inode from orphan list after failed direct io

Otherwise non-empty orphan list will be triggered on umount.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Dmitry Monakhov пре 15 година
родитељ
комит
da1dafca84
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      fs/ext4/inode.c

+ 3 - 0
fs/ext4/inode.c

@@ -3438,6 +3438,9 @@ retry:
 			 * but cannot extend i_size. Bail out and pretend
 			 * but cannot extend i_size. Bail out and pretend
 			 * the write failed... */
 			 * the write failed... */
 			ret = PTR_ERR(handle);
 			ret = PTR_ERR(handle);
+			if (inode->i_nlink)
+				ext4_orphan_del(NULL, inode);
+
 			goto out;
 			goto out;
 		}
 		}
 		if (inode->i_nlink)
 		if (inode->i_nlink)