Skip to content

Commit

Permalink
ext4: 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.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Dmitry Monakhov authored and Theodore Ts'o committed Mar 2, 2010
1 parent f39490b commit da1dafc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3438,6 +3438,9 @@ static ssize_t ext4_ind_direct_IO(int rw, struct kiocb *iocb,
* 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)
Expand Down

0 comments on commit da1dafc

Please sign in to comment.