diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0600265cb9b0..3bd0ff63bf30 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -6589,6 +6589,12 @@ static int btrfs_truncate(struct inode *inode) | |||
6589 | ret = btrfs_orphan_del(trans, inode); | 6589 | ret = btrfs_orphan_del(trans, inode); |
6590 | if (ret) | 6590 | if (ret) |
6591 | err = ret; | 6591 | err = ret; |
6592 | } else if (ret && inode->i_nlink > 0) { | ||
6593 | /* | ||
6594 | * Failed to do the truncate, remove us from the in memory | ||
6595 | * orphan list. | ||
6596 | */ | ||
6597 | ret = btrfs_orphan_del(NULL, inode); | ||
6592 | } | 6598 | } |
6593 | 6599 | ||
6594 | ret = btrfs_update_inode(trans, root, inode); | 6600 | ret = btrfs_update_inode(trans, root, inode); |