diff options
author | Nikolay Borisov <[email protected]> | 2016-07-29 20:02:59 +0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-07-29 15:34:12 -0700 |
commit | ba2fe6affb98543d8c3786fb47e49653391a3405 (patch) | |
tree | a767b4c54169b2247d271f879380b54b7d9c1418 /module/zfs | |
parent | e334e828a6d8bbcff51b61acb0f7b4d238a28089 (diff) |
Move assignment of i_blkbits field
Currently i_blkbits is always set to SPA_MINBLOCKSHIFT every time
zfs_inode_update_impl is called. Since this value never changes
move its assignment to at inode creation time.
Signed-off-by: Nikolay Borisov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4906
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/zfs_znode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c index b43b576e8..74502935c 100644 --- a/module/zfs/zfs_znode.c +++ b/module/zfs/zfs_znode.c @@ -535,7 +535,6 @@ zfs_inode_update_impl(znode_t *zp, boolean_t new) spin_lock(&ip->i_lock); ip->i_mode = zp->z_mode; zfs_set_inode_flags(zp, ip); - ip->i_blkbits = SPA_MINBLOCKSHIFT; ip->i_blocks = i_blocks; /* @@ -634,6 +633,7 @@ zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz, zp->z_mode = mode; ip->i_generation = (uint32_t)tmp_gen; + ip->i_blkbits = SPA_MINBLOCKSHIFT; set_nlink(ip, (uint32_t)links); zfs_uid_write(ip, z_uid); zfs_gid_write(ip, z_gid); |