aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorCheng Renquan <crquan@gmail.com>2010-03-26 05:40:33 -0400
committerSage Weil <sage@newdream.net>2010-05-17 18:25:17 -0400
commit640ef79d27c81b7a3265a344ec1d25644dd463ad (patch)
treef5632a0b2a2f6cef7c6f3a513bbb6020d6ac694a /fs/ceph/inode.c
parent2d06eeb877581a7f53209af1582c5f66c799f0bd (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/inode.c')
-rw-r--r--fs/ceph/inode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 220a2aec0545..ef917232cf37 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -384,7 +384,7 @@ void ceph_destroy_inode(struct inode *inode)
384 */ 384 */
385 if (ci->i_snap_realm) { 385 if (ci->i_snap_realm) {
386 struct ceph_mds_client *mdsc = 386 struct ceph_mds_client *mdsc =
387 &ceph_client(ci->vfs_inode.i_sb)->mdsc; 387 &ceph_sb_to_client(ci->vfs_inode.i_sb)->mdsc;
388 struct ceph_snap_realm *realm = ci->i_snap_realm; 388 struct ceph_snap_realm *realm = ci->i_snap_realm;
389 389
390 dout(" dropping residual ref to snap realm %p\n", realm); 390 dout(" dropping residual ref to snap realm %p\n", realm);
@@ -623,7 +623,7 @@ static int fill_inode(struct inode *inode,
623 623
624 inode->i_mapping->a_ops = &ceph_aops; 624 inode->i_mapping->a_ops = &ceph_aops;
625 inode->i_mapping->backing_dev_info = 625 inode->i_mapping->backing_dev_info =
626 &ceph_client(inode->i_sb)->backing_dev_info; 626 &ceph_sb_to_client(inode->i_sb)->backing_dev_info;
627 627
628 switch (inode->i_mode & S_IFMT) { 628 switch (inode->i_mode & S_IFMT) {
629 case S_IFIFO: 629 case S_IFIFO:
@@ -681,7 +681,7 @@ static int fill_inode(struct inode *inode,
681 } 681 }
682 682
683 /* it may be better to set st_size in getattr instead? */ 683 /* it may be better to set st_size in getattr instead? */
684 if (ceph_test_opt(ceph_client(inode->i_sb), RBYTES)) 684 if (ceph_test_opt(ceph_sb_to_client(inode->i_sb), RBYTES))
685 inode->i_size = ci->i_rbytes; 685 inode->i_size = ci->i_rbytes;
686 break; 686 break;
687 default: 687 default:
@@ -1438,7 +1438,7 @@ void ceph_queue_vmtruncate(struct inode *inode)
1438{ 1438{
1439 struct ceph_inode_info *ci = ceph_inode(inode); 1439 struct ceph_inode_info *ci = ceph_inode(inode);
1440 1440
1441 if (queue_work(ceph_client(inode->i_sb)->trunc_wq, 1441 if (queue_work(ceph_sb_to_client(inode->i_sb)->trunc_wq,
1442 &ci->i_vmtruncate_work)) { 1442 &ci->i_vmtruncate_work)) {
1443 dout("ceph_queue_vmtruncate %p\n", inode); 1443 dout("ceph_queue_vmtruncate %p\n", inode);
1444 igrab(inode); 1444 igrab(inode);
@@ -1527,7 +1527,7 @@ int ceph_setattr(struct dentry *dentry, struct iattr *attr)
1527 struct inode *parent_inode = dentry->d_parent->d_inode; 1527 struct inode *parent_inode = dentry->d_parent->d_inode;
1528 const unsigned int ia_valid = attr->ia_valid; 1528 const unsigned int ia_valid = attr->ia_valid;
1529 struct ceph_mds_request *req; 1529 struct ceph_mds_request *req;
1530 struct ceph_mds_client *mdsc = &ceph_client(dentry->d_sb)->mdsc; 1530 struct ceph_mds_client *mdsc = &ceph_sb_to_client(dentry->d_sb)->mdsc;
1531 int issued; 1531 int issued;
1532 int release = 0, dirtied = 0; 1532 int release = 0, dirtied = 0;
1533 int mask = 0; 1533 int mask = 0;