diff options
author | Dave Chinner <david@fromorbit.com> | 2015-06-23 00:49:01 +0200 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-06-23 00:49:01 +0200 |
commit | de50e16ffabf64d30ca9372f39dc855a7553e305 (patch) | |
tree | 08b926c00c75fde21823ee8279ce1473546d1356 /fs/xfs/xfs_attr_inactive.c | |
parent | Merge branch 'xfs-freelist-cleanup' into for-next (diff) | |
parent | xfs: don't truncate attribute extents if no extents exist (diff) | |
download | linux-de50e16ffabf64d30ca9372f39dc855a7553e305.tar.xz linux-de50e16ffabf64d30ca9372f39dc855a7553e305.zip |
Merge branch 'xfs-misc-fixes-for-4.2-3' into for-next
Diffstat (limited to 'fs/xfs/xfs_attr_inactive.c')
-rw-r--r-- | fs/xfs/xfs_attr_inactive.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/xfs/xfs_attr_inactive.c b/fs/xfs/xfs_attr_inactive.c index 69a154c58287..2bb959ada45b 100644 --- a/fs/xfs/xfs_attr_inactive.c +++ b/fs/xfs/xfs_attr_inactive.c @@ -433,8 +433,14 @@ xfs_attr_inactive( */ xfs_trans_ijoin(trans, dp, 0); - /* invalidate and truncate the attribute fork extents */ - if (dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) { + /* + * Invalidate and truncate the attribute fork extents. Make sure the + * fork actually has attributes as otherwise the invalidation has no + * blocks to read and returns an error. In this case, just do the fork + * removal below. + */ + if (xfs_inode_hasattr(dp) && + dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) { error = xfs_attr3_root_inactive(&trans, dp); if (error) goto out_cancel; |