]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ext3: explicitly remove inode from orphan list after failed direct io
authorEric Sandeen <sandeen@redhat.com>
Mon, 17 Mar 2014 19:13:00 +0000 (14:13 -0500)
committerJan Kara <jack@suse.cz>
Mon, 17 Mar 2014 19:21:08 +0000 (20:21 +0100)
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>
fs/ext3/inode.c

index ddf5c21cffbc1698620a8c07ee648e82f31aa49c..77042a2e017c94631f6de3d3a270f6e5145dd105 100644 (file)
@@ -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)