summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorYongqiang Yang <xiaoqiangnk@gmail.com>2014-01-06 14:06:18 -0500
committerTheodore Ts'o <tytso@mit.edu>2014-01-06 14:06:18 -0500
commit65eddb56f465f314502679ceade6fc5848a53a50 (patch)
tree4947335d73332a1bc5b1f43e7d46cbdc87b732b1 /fs/ext4
parent9e740568bc65a82845330b9439514255140b94aa (diff)
downloadblackbird-op-linux-65eddb56f465f314502679ceade6fc5848a53a50.tar.gz
blackbird-op-linux-65eddb56f465f314502679ceade6fc5848a53a50.zip
ext4: ext4_inode_is_fast_symlink should use EXT4_CLUSTER_SIZE
Can be reproduced by xfstests 62 with bigalloc and 128bit size inode. Signed-off-by: Yongqiang Yang <yangyongqiang01@baidu.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 90a4ea781cd4..8454ebe238a0 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -144,8 +144,8 @@ static int ext4_meta_trans_blocks(struct inode *inode, int lblocks,
*/
static int ext4_inode_is_fast_symlink(struct inode *inode)
{
- int ea_blocks = EXT4_I(inode)->i_file_acl ?
- (inode->i_sb->s_blocksize >> 9) : 0;
+ int ea_blocks = EXT4_I(inode)->i_file_acl ?
+ EXT4_CLUSTER_SIZE(inode->i_sb) >> 9 : 0;
return (S_ISLNK(inode->i_mode) && inode->i_blocks - ea_blocks == 0);
}
OpenPOWER on IntegriCloud