From: Eric Sandeen Date: Mon, 17 Mar 2014 19:13:00 +0000 (-0500) Subject: ext3: explicitly remove inode from orphan list after failed direct io X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f294d3e7be28c43205f41eb0fff97393105d6d2c;p=linux-beck.git 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 Signed-off-by: Jan Kara --- diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index ddf5c21cffbc..77042a2e017c 100644 --- a/fs/ext3/inode.c +++ b/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)