commit | 774a6a118c70f8c11fcfe636032b5016ad71a746 | [log] [tgz] |
---|---|---|
author | Yan, Zheng <zyan@redhat.com> | Mon Jun 06 16:01:39 2016 +0800 |
committer | Ilya Dryomov <idryomov@gmail.com> | Thu Jul 28 02:55:39 2016 +0200 |
tree | 8c1380f9b9fe2b6db6360b68f4aad373be01072b | |
parent | a22bd5ffae2d22c054c832fe0d60976ed9e4a49d [diff] [blame] |
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>
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index dc03256..8ca8433 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c
@@ -477,7 +477,7 @@ 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);