diff options
author | Dave Chinner <david@fromorbit.com> | 2015-06-23 08:49:01 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-06-23 08:49:01 +1000 |
commit | de50e16ffabf64d30ca9372f39dc855a7553e305 (patch) | |
tree | 08b926c00c75fde21823ee8279ce1473546d1356 /fs/xfs/xfs_attr_inactive.c | |
parent | 3d238b7e0efc2d9dde7513298ef32da289a6a0f4 (diff) | |
parent | f66bf042693b620133d39af8d2f13615f03eadfc (diff) | |
download | op-kernel-dev-de50e16ffabf64d30ca9372f39dc855a7553e305.zip op-kernel-dev-de50e16ffabf64d30ca9372f39dc855a7553e305.tar.gz |
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 69a154c..2bb959a 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; |