diff options
author | Cheng Renquan <crquan@gmail.com> | 2010-03-26 05:40:33 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-17 18:25:17 -0400 |
commit | 640ef79d27c81b7a3265a344ec1d25644dd463ad (patch) | |
tree | f5632a0b2a2f6cef7c6f3a513bbb6020d6ac694a /fs/ceph/dir.c | |
parent | 2d06eeb877581a7f53209af1582c5f66c799f0bd (diff) |
ceph: use ceph_sb_to_client instead of ceph_client
ceph_sb_to_client and ceph_client are really identical, we need to dump
one; while function ceph_client is confusing with "struct ceph_client",
ceph_sb_to_client's definition is more clear; so we'd better switch all
call to ceph_sb_to_client.
-static inline struct ceph_client *ceph_client(struct super_block *sb)
-{
- return sb->s_fs_info;
-}
Signed-off-by: Cheng Renquan <crquan@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r-- | fs/ceph/dir.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 4b1a7a4bae0b..33feac75c532 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -478,7 +478,7 @@ static loff_t ceph_dir_llseek(struct file *file, loff_t offset, int origin) | |||
478 | struct dentry *ceph_finish_lookup(struct ceph_mds_request *req, | 478 | struct dentry *ceph_finish_lookup(struct ceph_mds_request *req, |
479 | struct dentry *dentry, int err) | 479 | struct dentry *dentry, int err) |
480 | { | 480 | { |
481 | struct ceph_client *client = ceph_client(dentry->d_sb); | 481 | struct ceph_client *client = ceph_sb_to_client(dentry->d_sb); |
482 | struct inode *parent = dentry->d_parent->d_inode; | 482 | struct inode *parent = dentry->d_parent->d_inode; |
483 | 483 | ||
484 | /* .snap dir? */ | 484 | /* .snap dir? */ |
@@ -1059,7 +1059,7 @@ static ssize_t ceph_read_dir(struct file *file, char __user *buf, size_t size, | |||
1059 | struct ceph_inode_info *ci = ceph_inode(inode); | 1059 | struct ceph_inode_info *ci = ceph_inode(inode); |
1060 | int left; | 1060 | int left; |
1061 | 1061 | ||
1062 | if (!ceph_test_opt(ceph_client(inode->i_sb), DIRSTAT)) | 1062 | if (!ceph_test_opt(ceph_sb_to_client(inode->i_sb), DIRSTAT)) |
1063 | return -EISDIR; | 1063 | return -EISDIR; |
1064 | 1064 | ||
1065 | if (!cf->dir_info) { | 1065 | if (!cf->dir_info) { |
@@ -1161,7 +1161,7 @@ void ceph_dentry_lru_add(struct dentry *dn) | |||
1161 | dout("dentry_lru_add %p %p '%.*s'\n", di, dn, | 1161 | dout("dentry_lru_add %p %p '%.*s'\n", di, dn, |
1162 | dn->d_name.len, dn->d_name.name); | 1162 | dn->d_name.len, dn->d_name.name); |
1163 | if (di) { | 1163 | if (di) { |
1164 | mdsc = &ceph_client(dn->d_sb)->mdsc; | 1164 | mdsc = &ceph_sb_to_client(dn->d_sb)->mdsc; |
1165 | spin_lock(&mdsc->dentry_lru_lock); | 1165 | spin_lock(&mdsc->dentry_lru_lock); |
1166 | list_add_tail(&di->lru, &mdsc->dentry_lru); | 1166 | list_add_tail(&di->lru, &mdsc->dentry_lru); |
1167 | mdsc->num_dentry++; | 1167 | mdsc->num_dentry++; |
@@ -1177,7 +1177,7 @@ void ceph_dentry_lru_touch(struct dentry *dn) | |||
1177 | dout("dentry_lru_touch %p %p '%.*s'\n", di, dn, | 1177 | dout("dentry_lru_touch %p %p '%.*s'\n", di, dn, |
1178 | dn->d_name.len, dn->d_name.name); | 1178 | dn->d_name.len, dn->d_name.name); |
1179 | if (di) { | 1179 | if (di) { |
1180 | mdsc = &ceph_client(dn->d_sb)->mdsc; | 1180 | mdsc = &ceph_sb_to_client(dn->d_sb)->mdsc; |
1181 | spin_lock(&mdsc->dentry_lru_lock); | 1181 | spin_lock(&mdsc->dentry_lru_lock); |
1182 | list_move_tail(&di->lru, &mdsc->dentry_lru); | 1182 | list_move_tail(&di->lru, &mdsc->dentry_lru); |
1183 | spin_unlock(&mdsc->dentry_lru_lock); | 1183 | spin_unlock(&mdsc->dentry_lru_lock); |
@@ -1192,7 +1192,7 @@ void ceph_dentry_lru_del(struct dentry *dn) | |||
1192 | dout("dentry_lru_del %p %p '%.*s'\n", di, dn, | 1192 | dout("dentry_lru_del %p %p '%.*s'\n", di, dn, |
1193 | dn->d_name.len, dn->d_name.name); | 1193 | dn->d_name.len, dn->d_name.name); |
1194 | if (di) { | 1194 | if (di) { |
1195 | mdsc = &ceph_client(dn->d_sb)->mdsc; | 1195 | mdsc = &ceph_sb_to_client(dn->d_sb)->mdsc; |
1196 | spin_lock(&mdsc->dentry_lru_lock); | 1196 | spin_lock(&mdsc->dentry_lru_lock); |
1197 | list_del_init(&di->lru); | 1197 | list_del_init(&di->lru); |
1198 | mdsc->num_dentry--; | 1198 | mdsc->num_dentry--; |