From 2c20b11766ad108f31b550fe28a32cf2ec445b19 Mon Sep 17 00:00:00 2001 From: Dmitry Monakhov Date: Sun, 30 May 2010 22:49:32 -0400 Subject: [PATCH] ext4: explicitly remove inode from orphan list after failed direct io commit da1dafca84413145f5ac59998b4cdd06fb89f721 upstream (as of v2.6.33-git11) Otherwise non-empty orphan list will be triggered on umount. Signed-off-by: Dmitry Monakhov Signed-off-by: "Theodore Ts'o" Signed-off-by: Greg Kroah-Hartman --- fs/ext4/inode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index ceba60661d81..65176242886a 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3480,6 +3480,9 @@ retry: * but cannot extend i_size. Bail out and pretend * the write failed... */ ret = PTR_ERR(handle); + if (inode->i_nlink) + ext4_orphan_del(NULL, inode); + goto out; } if (inode->i_nlink) -- 2.34.1