summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2009-10-15 11:10:49 +0800
committerJoel Becker <joel.becker@oracle.com>2009-10-28 22:48:23 -0700
commit2f48d593b6ceb7bb63d34124ceba77d33be298cf (patch)
tree87c77763eefb395dc25010ce989d4d704615225d /fs/ocfs2/file.c
parent87f4b1bb98696e6cf84f57df7de41f28c2a7dbeb (diff)
downloadblackbird-op-linux-2f48d593b6ceb7bb63d34124ceba77d33be298cf.tar.gz
blackbird-op-linux-2f48d593b6ceb7bb63d34124ceba77d33be298cf.zip
ocfs2: duplicate inline data properly during reflink.
The old reflink fails to handle inodes with inline data and will oops if it encounters them. This patch copies inline data to the new inode. Extended attributes may still be refcounted. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Tested-by: Tristan Ye <tristan.ye@oracle.com>
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 89fc8ee1f5a5..de059f490586 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1712,7 +1712,8 @@ int ocfs2_check_range_for_refcount(struct inode *inode, loff_t pos,
struct super_block *sb = inode->i_sb;
if (!ocfs2_refcount_tree(OCFS2_SB(inode->i_sb)) ||
- !(OCFS2_I(inode)->ip_dyn_features & OCFS2_HAS_REFCOUNT_FL))
+ !(OCFS2_I(inode)->ip_dyn_features & OCFS2_HAS_REFCOUNT_FL) ||
+ OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL)
return 0;
cpos = pos >> OCFS2_SB(sb)->s_clustersize_bits;
OpenPOWER on IntegriCloud