diff options
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r-- | fs/ceph/mds_client.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 71c073f38e54..a39389092102 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -679,7 +679,7 @@ static struct dentry *get_nonsnap_parent(struct dentry *dentry) | |||
679 | * except to resplice to another snapdir, and either the old or new | 679 | * except to resplice to another snapdir, and either the old or new |
680 | * result is a valid result. | 680 | * result is a valid result. |
681 | */ | 681 | */ |
682 | while (!IS_ROOT(dentry) && ceph_snap(dentry->d_inode) != CEPH_NOSNAP) | 682 | while (!IS_ROOT(dentry) && ceph_snap(d_inode(dentry)) != CEPH_NOSNAP) |
683 | dentry = dentry->d_parent; | 683 | dentry = dentry->d_parent; |
684 | return dentry; | 684 | return dentry; |
685 | } | 685 | } |
@@ -716,20 +716,20 @@ static int __choose_mds(struct ceph_mds_client *mdsc, | |||
716 | } else if (req->r_dentry) { | 716 | } else if (req->r_dentry) { |
717 | /* ignore race with rename; old or new d_parent is okay */ | 717 | /* ignore race with rename; old or new d_parent is okay */ |
718 | struct dentry *parent = req->r_dentry->d_parent; | 718 | struct dentry *parent = req->r_dentry->d_parent; |
719 | struct inode *dir = parent->d_inode; | 719 | struct inode *dir = d_inode(parent); |
720 | 720 | ||
721 | if (dir->i_sb != mdsc->fsc->sb) { | 721 | if (dir->i_sb != mdsc->fsc->sb) { |
722 | /* not this fs! */ | 722 | /* not this fs! */ |
723 | inode = req->r_dentry->d_inode; | 723 | inode = d_inode(req->r_dentry); |
724 | } else if (ceph_snap(dir) != CEPH_NOSNAP) { | 724 | } else if (ceph_snap(dir) != CEPH_NOSNAP) { |
725 | /* direct snapped/virtual snapdir requests | 725 | /* direct snapped/virtual snapdir requests |
726 | * based on parent dir inode */ | 726 | * based on parent dir inode */ |
727 | struct dentry *dn = get_nonsnap_parent(parent); | 727 | struct dentry *dn = get_nonsnap_parent(parent); |
728 | inode = dn->d_inode; | 728 | inode = d_inode(dn); |
729 | dout("__choose_mds using nonsnap parent %p\n", inode); | 729 | dout("__choose_mds using nonsnap parent %p\n", inode); |
730 | } else { | 730 | } else { |
731 | /* dentry target */ | 731 | /* dentry target */ |
732 | inode = req->r_dentry->d_inode; | 732 | inode = d_inode(req->r_dentry); |
733 | if (!inode || mode == USE_AUTH_MDS) { | 733 | if (!inode || mode == USE_AUTH_MDS) { |
734 | /* dir + name */ | 734 | /* dir + name */ |
735 | inode = dir; | 735 | inode = dir; |
@@ -1712,7 +1712,7 @@ retry: | |||
1712 | seq = read_seqbegin(&rename_lock); | 1712 | seq = read_seqbegin(&rename_lock); |
1713 | rcu_read_lock(); | 1713 | rcu_read_lock(); |
1714 | for (temp = dentry; !IS_ROOT(temp);) { | 1714 | for (temp = dentry; !IS_ROOT(temp);) { |
1715 | struct inode *inode = temp->d_inode; | 1715 | struct inode *inode = d_inode(temp); |
1716 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) | 1716 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) |
1717 | len++; /* slash only */ | 1717 | len++; /* slash only */ |
1718 | else if (stop_on_nosnap && inode && | 1718 | else if (stop_on_nosnap && inode && |
@@ -1736,7 +1736,7 @@ retry: | |||
1736 | struct inode *inode; | 1736 | struct inode *inode; |
1737 | 1737 | ||
1738 | spin_lock(&temp->d_lock); | 1738 | spin_lock(&temp->d_lock); |
1739 | inode = temp->d_inode; | 1739 | inode = d_inode(temp); |
1740 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) { | 1740 | if (inode && ceph_snap(inode) == CEPH_SNAPDIR) { |
1741 | dout("build_path path+%d: %p SNAPDIR\n", | 1741 | dout("build_path path+%d: %p SNAPDIR\n", |
1742 | pos, temp); | 1742 | pos, temp); |
@@ -1770,7 +1770,7 @@ retry: | |||
1770 | goto retry; | 1770 | goto retry; |
1771 | } | 1771 | } |
1772 | 1772 | ||
1773 | *base = ceph_ino(temp->d_inode); | 1773 | *base = ceph_ino(d_inode(temp)); |
1774 | *plen = len; | 1774 | *plen = len; |
1775 | dout("build_path on %p %d built %llx '%.*s'\n", | 1775 | dout("build_path on %p %d built %llx '%.*s'\n", |
1776 | dentry, d_count(dentry), *base, len, path); | 1776 | dentry, d_count(dentry), *base, len, path); |
@@ -1783,8 +1783,8 @@ static int build_dentry_path(struct dentry *dentry, | |||
1783 | { | 1783 | { |
1784 | char *path; | 1784 | char *path; |
1785 | 1785 | ||
1786 | if (ceph_snap(dentry->d_parent->d_inode) == CEPH_NOSNAP) { | 1786 | if (ceph_snap(d_inode(dentry->d_parent)) == CEPH_NOSNAP) { |
1787 | *pino = ceph_ino(dentry->d_parent->d_inode); | 1787 | *pino = ceph_ino(d_inode(dentry->d_parent)); |
1788 | *ppath = dentry->d_name.name; | 1788 | *ppath = dentry->d_name.name; |
1789 | *ppathlen = dentry->d_name.len; | 1789 | *ppathlen = dentry->d_name.len; |
1790 | return 0; | 1790 | return 0; |
@@ -1925,7 +1925,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc, | |||
1925 | releases = 0; | 1925 | releases = 0; |
1926 | if (req->r_inode_drop) | 1926 | if (req->r_inode_drop) |
1927 | releases += ceph_encode_inode_release(&p, | 1927 | releases += ceph_encode_inode_release(&p, |
1928 | req->r_inode ? req->r_inode : req->r_dentry->d_inode, | 1928 | req->r_inode ? req->r_inode : d_inode(req->r_dentry), |
1929 | mds, req->r_inode_drop, req->r_inode_unless, 0); | 1929 | mds, req->r_inode_drop, req->r_inode_unless, 0); |
1930 | if (req->r_dentry_drop) | 1930 | if (req->r_dentry_drop) |
1931 | releases += ceph_encode_dentry_release(&p, req->r_dentry, | 1931 | releases += ceph_encode_dentry_release(&p, req->r_dentry, |
@@ -1935,7 +1935,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc, | |||
1935 | mds, req->r_old_dentry_drop, req->r_old_dentry_unless); | 1935 | mds, req->r_old_dentry_drop, req->r_old_dentry_unless); |
1936 | if (req->r_old_inode_drop) | 1936 | if (req->r_old_inode_drop) |
1937 | releases += ceph_encode_inode_release(&p, | 1937 | releases += ceph_encode_inode_release(&p, |
1938 | req->r_old_dentry->d_inode, | 1938 | d_inode(req->r_old_dentry), |
1939 | mds, req->r_old_inode_drop, req->r_old_inode_unless, 0); | 1939 | mds, req->r_old_inode_drop, req->r_old_inode_unless, 0); |
1940 | head->num_releases = cpu_to_le16(releases); | 1940 | head->num_releases = cpu_to_le16(releases); |
1941 | 1941 | ||