浏览代码

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

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

This is just an application of commit da1daf by Dmitry Monakhov
to the same code in ext3.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Eric Sandeen 11 年之前
父节点
当前提交
f294d3e7be
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      fs/ext3/inode.c

+ 2 - 0
fs/ext3/inode.c

@@ -1883,6 +1883,8 @@ retry:
 			 * and pretend the write failed... */
 			ext3_truncate_failed_direct_write(inode);
 			ret = PTR_ERR(handle);
+			if (inode->i_nlink)
+				ext3_orphan_del(NULL, inode);
 			goto out;
 		}
 		if (inode->i_nlink)