Skip to content

Commit

Permalink
ext3: explicitly remove inode from orphan list after failed direct io
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sandeen authored and Jan Kara committed Mar 17, 2014
1 parent b3b749b commit f294d3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ext3/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1883,6 +1883,8 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb,
* 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)
Expand Down

0 comments on commit f294d3e

Please sign in to comment.