diff options
author | Chengguang Xu <cgxu519@icloud.com> | 2018-02-28 19:43:47 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-04-02 10:12:47 +0200 |
commit | 73737682e0598ae73bd4c481e478a0d75884aa8a (patch) | |
tree | 938552dc32bbe1d6bd639d40f10e919c7c7d4a2a /fs/ceph/dir.c | |
parent | 79cd674aed7363a043222af3c8f97d0ea0a078cf (diff) | |
download | linux-73737682e0598ae73bd4c481e478a0d75884aa8a.tar.gz linux-73737682e0598ae73bd4c481e478a0d75884aa8a.tar.bz2 linux-73737682e0598ae73bd4c481e478a0d75884aa8a.zip |
ceph: change variable name to follow common rule
Variable name ci is mostly used for ceph_inode_info.
Variable name fi is mostly used for ceph_file_info.
Variable name cf is mostly used for ceph_cap_flush.
Change variable name to follow above common rules
in case of confusing.
Signed-off-by: Chengguang Xu <cgxu519@icloud.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r-- | fs/ceph/dir.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index b7771e9e0c71..1aa3bfc9ef35 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1352,7 +1352,7 @@ static void ceph_d_prune(struct dentry *dentry) static ssize_t ceph_read_dir(struct file *file, char __user *buf, size_t size, loff_t *ppos) { - struct ceph_file_info *cf = file->private_data; + struct ceph_file_info *fi = file->private_data; struct inode *inode = file_inode(file); struct ceph_inode_info *ci = ceph_inode(inode); int left; @@ -1361,12 +1361,12 @@ static ssize_t ceph_read_dir(struct file *file, char __user *buf, size_t size, if (!ceph_test_mount_opt(ceph_sb_to_client(inode->i_sb), DIRSTAT)) return -EISDIR; - if (!cf->dir_info) { - cf->dir_info = kmalloc(bufsize, GFP_KERNEL); - if (!cf->dir_info) + if (!fi->dir_info) { + fi->dir_info = kmalloc(bufsize, GFP_KERNEL); + if (!fi->dir_info) return -ENOMEM; - cf->dir_info_len = - snprintf(cf->dir_info, bufsize, + fi->dir_info_len = + snprintf(fi->dir_info, bufsize, "entries: %20lld\n" " files: %20lld\n" " subdirs: %20lld\n" @@ -1386,10 +1386,10 @@ static ssize_t ceph_read_dir(struct file *file, char __user *buf, size_t size, (long)ci->i_rctime.tv_nsec); } - if (*ppos >= cf->dir_info_len) + if (*ppos >= fi->dir_info_len) return 0; - size = min_t(unsigned, size, cf->dir_info_len-*ppos); - left = copy_to_user(buf, cf->dir_info + *ppos, size); + size = min_t(unsigned, size, fi->dir_info_len-*ppos); + left = copy_to_user(buf, fi->dir_info + *ppos, size); if (left == size) return -EFAULT; *ppos += (size - left); |