summaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2016-06-06 16:01:39 +0800
committerIlya Dryomov <idryomov@gmail.com>2016-07-28 02:55:39 +0200
commit774a6a118c70f8c11fcfe636032b5016ad71a746 (patch)
tree8c1380f9b9fe2b6db6360b68f4aad373be01072b /fs/ceph/inode.c
parenta22bd5ffae2d22c054c832fe0d60976ed9e4a49d (diff)
downloadlinux-774a6a118c70f8c11fcfe636032b5016ad71a746.tar.bz2
ceph: reduce i_nr_by_mode array size
Track usage count for individual fmode bit. This can reduce the array size by half. Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index dc032566ed71..8ca843371d4b 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -477,7 +477,7 @@ struct inode *ceph_alloc_inode(struct super_block *sb)
ci->i_head_snapc = NULL;
ci->i_snap_caps = 0;
- for (i = 0; i < CEPH_FILE_MODE_NUM; i++)
+ for (i = 0; i < CEPH_FILE_MODE_BITS; i++)
ci->i_nr_by_mode[i] = 0;
mutex_init(&ci->i_truncate_mutex);