Skip to content

Commit 5995d90

Browse files
lxbszidryomov
authored andcommitted
ceph: rename _to_client() to _to_fs_client()
We need to covert the inode to ceph_client in the following commit, and will add one new helper for that, here we rename the old helper to _fs_client(). Link: https://tracker.ceph.com/issues/61590 Signed-off-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Patrick Donnelly <pdonnell@redhat.com> Reviewed-by: Milind Changire <mchangir@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1 parent 197b7d7 commit 5995d90

14 files changed

Lines changed: 95 additions & 95 deletions

File tree

fs/ceph/addr.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ static void ceph_netfs_expand_readahead(struct netfs_io_request *rreq)
229229
static bool ceph_netfs_clamp_length(struct netfs_io_subrequest *subreq)
230230
{
231231
struct inode *inode = subreq->rreq->inode;
232-
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
232+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
233233
struct ceph_inode_info *ci = ceph_inode(inode);
234234
u64 objno, objoff;
235235
u32 xlen;
@@ -244,7 +244,7 @@ static bool ceph_netfs_clamp_length(struct netfs_io_subrequest *subreq)
244244
static void finish_netfs_read(struct ceph_osd_request *req)
245245
{
246246
struct inode *inode = req->r_inode;
247-
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
247+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
248248
struct ceph_osd_data *osd_data = osd_req_op_extent_osd_data(req, 0);
249249
struct netfs_io_subrequest *subreq = req->r_priv;
250250
struct ceph_osd_req_op *op = &req->r_ops[0];
@@ -348,7 +348,7 @@ static void ceph_netfs_issue_read(struct netfs_io_subrequest *subreq)
348348
struct netfs_io_request *rreq = subreq->rreq;
349349
struct inode *inode = rreq->inode;
350350
struct ceph_inode_info *ci = ceph_inode(inode);
351-
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
351+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
352352
struct ceph_osd_request *req = NULL;
353353
struct ceph_vino vino = ceph_vino(inode);
354354
struct iov_iter iter;
@@ -658,7 +658,7 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
658658
struct folio *folio = page_folio(page);
659659
struct inode *inode = page->mapping->host;
660660
struct ceph_inode_info *ci = ceph_inode(inode);
661-
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
661+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
662662
struct ceph_snap_context *snapc, *oldest;
663663
loff_t page_off = page_offset(page);
664664
int err;
@@ -803,7 +803,7 @@ static int ceph_writepage(struct page *page, struct writeback_control *wbc)
803803
ihold(inode);
804804

805805
if (wbc->sync_mode == WB_SYNC_NONE &&
806-
ceph_inode_to_client(inode)->write_congested)
806+
ceph_inode_to_fs_client(inode)->write_congested)
807807
return AOP_WRITEPAGE_ACTIVATE;
808808

809809
wait_on_page_fscache(page);
@@ -836,7 +836,7 @@ static void writepages_finish(struct ceph_osd_request *req)
836836
int rc = req->r_result;
837837
struct ceph_snap_context *snapc = req->r_snapc;
838838
struct address_space *mapping = inode->i_mapping;
839-
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
839+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
840840
unsigned int len = 0;
841841
bool remove_page;
842842

@@ -926,7 +926,7 @@ static int ceph_writepages_start(struct address_space *mapping,
926926
{
927927
struct inode *inode = mapping->host;
928928
struct ceph_inode_info *ci = ceph_inode(inode);
929-
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
929+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
930930
struct ceph_vino vino = ceph_vino(inode);
931931
pgoff_t index, start_index, end = -1;
932932
struct ceph_snap_context *snapc = NULL, *last_snapc = NULL, *pgsnapc;
@@ -1823,7 +1823,7 @@ int ceph_uninline_data(struct file *file)
18231823
{
18241824
struct inode *inode = file_inode(file);
18251825
struct ceph_inode_info *ci = ceph_inode(inode);
1826-
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
1826+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
18271827
struct ceph_osd_request *req = NULL;
18281828
struct ceph_cap_flush *prealloc_cf = NULL;
18291829
struct folio *folio = NULL;
@@ -1977,7 +1977,7 @@ enum {
19771977
static int __ceph_pool_perm_get(struct ceph_inode_info *ci,
19781978
s64 pool, struct ceph_string *pool_ns)
19791979
{
1980-
struct ceph_fs_client *fsc = ceph_inode_to_client(&ci->netfs.inode);
1980+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(&ci->netfs.inode);
19811981
struct ceph_mds_client *mdsc = fsc->mdsc;
19821982
struct ceph_osd_request *rd_req = NULL, *wr_req = NULL;
19831983
struct rb_node **p, *parent;
@@ -2168,7 +2168,7 @@ int ceph_pool_perm_check(struct inode *inode, int need)
21682168
return 0;
21692169
}
21702170

2171-
if (ceph_test_mount_opt(ceph_inode_to_client(inode),
2171+
if (ceph_test_mount_opt(ceph_inode_to_fs_client(inode),
21722172
NOPOOLPERM))
21732173
return 0;
21742174

fs/ceph/cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
void ceph_fscache_register_inode_cookie(struct inode *inode)
1616
{
1717
struct ceph_inode_info *ci = ceph_inode(inode);
18-
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
18+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
1919

2020
/* No caching for filesystem? */
2121
if (!fsc->fscache)

fs/ceph/caps.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ void ceph_add_cap(struct inode *inode,
635635
unsigned seq, unsigned mseq, u64 realmino, int flags,
636636
struct ceph_cap **new_cap)
637637
{
638-
struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc;
638+
struct ceph_mds_client *mdsc = ceph_inode_to_fs_client(inode)->mdsc;
639639
struct ceph_inode_info *ci = ceph_inode(inode);
640640
struct ceph_cap *cap;
641641
int mds = session->s_mds;
@@ -922,7 +922,7 @@ int __ceph_caps_issued_mask(struct ceph_inode_info *ci, int mask, int touch)
922922
int __ceph_caps_issued_mask_metric(struct ceph_inode_info *ci, int mask,
923923
int touch)
924924
{
925-
struct ceph_fs_client *fsc = ceph_sb_to_client(ci->netfs.inode.i_sb);
925+
struct ceph_fs_client *fsc = ceph_sb_to_fs_client(ci->netfs.inode.i_sb);
926926
int r;
927927

928928
r = __ceph_caps_issued_mask(ci, mask, touch);
@@ -996,7 +996,7 @@ int __ceph_caps_file_wanted(struct ceph_inode_info *ci)
996996
const int WR_SHIFT = ffs(CEPH_FILE_MODE_WR);
997997
const int LAZY_SHIFT = ffs(CEPH_FILE_MODE_LAZY);
998998
struct ceph_mount_options *opt =
999-
ceph_inode_to_client(&ci->netfs.inode)->mount_options;
999+
ceph_inode_to_fs_client(&ci->netfs.inode)->mount_options;
10001000
unsigned long used_cutoff = jiffies - opt->caps_wanted_delay_max * HZ;
10011001
unsigned long idle_cutoff = jiffies - opt->caps_wanted_delay_min * HZ;
10021002

@@ -1121,7 +1121,7 @@ void __ceph_remove_cap(struct ceph_cap *cap, bool queue_release)
11211121

11221122
dout("__ceph_remove_cap %p from %p\n", cap, &ci->netfs.inode);
11231123

1124-
mdsc = ceph_inode_to_client(&ci->netfs.inode)->mdsc;
1124+
mdsc = ceph_inode_to_fs_client(&ci->netfs.inode)->mdsc;
11251125

11261126
/* remove from inode's cap rbtree, and clear auth cap */
11271127
rb_erase(&cap->ci_node, &ci->i_caps);
@@ -1192,7 +1192,7 @@ void ceph_remove_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
11921192

11931193
lockdep_assert_held(&ci->i_ceph_lock);
11941194

1195-
fsc = ceph_inode_to_client(&ci->netfs.inode);
1195+
fsc = ceph_inode_to_fs_client(&ci->netfs.inode);
11961196
WARN_ON_ONCE(ci->i_auth_cap == cap &&
11971197
!list_empty(&ci->i_dirty_item) &&
11981198
!fsc->blocklisted &&
@@ -1344,7 +1344,7 @@ static void encode_cap_msg(struct ceph_msg *msg, struct cap_msg_args *arg)
13441344
void __ceph_remove_caps(struct ceph_inode_info *ci)
13451345
{
13461346
struct inode *inode = &ci->netfs.inode;
1347-
struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc;
1347+
struct ceph_mds_client *mdsc = ceph_inode_to_fs_client(inode)->mdsc;
13481348
struct rb_node *p;
13491349

13501350
/* lock i_ceph_lock, because ceph_d_revalidate(..., LOOKUP_RCU)
@@ -1688,7 +1688,7 @@ void ceph_flush_snaps(struct ceph_inode_info *ci,
16881688
struct ceph_mds_session **psession)
16891689
{
16901690
struct inode *inode = &ci->netfs.inode;
1691-
struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc;
1691+
struct ceph_mds_client *mdsc = ceph_inode_to_fs_client(inode)->mdsc;
16921692
struct ceph_mds_session *session = NULL;
16931693
bool need_put = false;
16941694
int mds;
@@ -1753,7 +1753,7 @@ int __ceph_mark_dirty_caps(struct ceph_inode_info *ci, int mask,
17531753
struct ceph_cap_flush **pcf)
17541754
{
17551755
struct ceph_mds_client *mdsc =
1756-
ceph_sb_to_client(ci->netfs.inode.i_sb)->mdsc;
1756+
ceph_sb_to_fs_client(ci->netfs.inode.i_sb)->mdsc;
17571757
struct inode *inode = &ci->netfs.inode;
17581758
int was = ci->i_dirty_caps;
17591759
int dirty = 0;
@@ -1876,7 +1876,7 @@ static u64 __mark_caps_flushing(struct inode *inode,
18761876
struct ceph_mds_session *session, bool wake,
18771877
u64 *oldest_flush_tid)
18781878
{
1879-
struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc;
1879+
struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(inode->i_sb)->mdsc;
18801880
struct ceph_inode_info *ci = ceph_inode(inode);
18811881
struct ceph_cap_flush *cf = NULL;
18821882
int flushing;
@@ -2235,7 +2235,7 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags)
22352235
*/
22362236
static int try_flush_caps(struct inode *inode, u64 *ptid)
22372237
{
2238-
struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc;
2238+
struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(inode->i_sb)->mdsc;
22392239
struct ceph_inode_info *ci = ceph_inode(inode);
22402240
int flushing = 0;
22412241
u64 flush_tid = 0, oldest_flush_tid = 0;
@@ -2313,7 +2313,7 @@ static int caps_are_flushed(struct inode *inode, u64 flush_tid)
23132313
*/
23142314
static int flush_mdlog_and_wait_inode_unsafe_requests(struct inode *inode)
23152315
{
2316-
struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc;
2316+
struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(inode->i_sb)->mdsc;
23172317
struct ceph_inode_info *ci = ceph_inode(inode);
23182318
struct ceph_mds_request *req1 = NULL, *req2 = NULL;
23192319
int ret, err = 0;
@@ -2496,7 +2496,7 @@ int ceph_write_inode(struct inode *inode, struct writeback_control *wbc)
24962496
caps_are_flushed(inode, flush_tid));
24972497
} else {
24982498
struct ceph_mds_client *mdsc =
2499-
ceph_sb_to_client(inode->i_sb)->mdsc;
2499+
ceph_sb_to_fs_client(inode->i_sb)->mdsc;
25002500

25012501
spin_lock(&ci->i_ceph_lock);
25022502
if (__ceph_caps_dirty(ci))
@@ -2749,7 +2749,7 @@ static int try_get_cap_refs(struct inode *inode, int need, int want,
27492749
loff_t endoff, int flags, int *got)
27502750
{
27512751
struct ceph_inode_info *ci = ceph_inode(inode);
2752-
struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc;
2752+
struct ceph_mds_client *mdsc = ceph_inode_to_fs_client(inode)->mdsc;
27532753
int ret = 0;
27542754
int have, implemented;
27552755
bool snap_rwsem_locked = false;
@@ -2967,7 +2967,7 @@ int __ceph_get_caps(struct inode *inode, struct ceph_file_info *fi, int need,
29672967
int want, loff_t endoff, int *got)
29682968
{
29692969
struct ceph_inode_info *ci = ceph_inode(inode);
2970-
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
2970+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
29712971
int ret, _got, flags;
29722972

29732973
ret = ceph_pool_perm_check(inode, need);
@@ -3730,7 +3730,7 @@ static void handle_cap_flush_ack(struct inode *inode, u64 flush_tid,
37303730
__releases(ci->i_ceph_lock)
37313731
{
37323732
struct ceph_inode_info *ci = ceph_inode(inode);
3733-
struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc;
3733+
struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(inode->i_sb)->mdsc;
37343734
struct ceph_cap_flush *cf, *tmp_cf;
37353735
LIST_HEAD(to_remove);
37363736
unsigned seq = le32_to_cpu(m->seq);
@@ -3836,7 +3836,7 @@ void __ceph_remove_capsnap(struct inode *inode, struct ceph_cap_snap *capsnap,
38363836
bool *wake_ci, bool *wake_mdsc)
38373837
{
38383838
struct ceph_inode_info *ci = ceph_inode(inode);
3839-
struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc;
3839+
struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(inode->i_sb)->mdsc;
38403840
bool ret;
38413841

38423842
lockdep_assert_held(&ci->i_ceph_lock);
@@ -3880,7 +3880,7 @@ static void handle_cap_flushsnap_ack(struct inode *inode, u64 flush_tid,
38803880
struct ceph_mds_session *session)
38813881
{
38823882
struct ceph_inode_info *ci = ceph_inode(inode);
3883-
struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc;
3883+
struct ceph_mds_client *mdsc = ceph_sb_to_fs_client(inode->i_sb)->mdsc;
38843884
u64 follows = le64_to_cpu(m->snap_follows);
38853885
struct ceph_cap_snap *capsnap = NULL, *iter;
38863886
bool wake_ci = false;
@@ -3972,7 +3972,7 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex,
39723972
struct ceph_mds_cap_peer *ph,
39733973
struct ceph_mds_session *session)
39743974
{
3975-
struct ceph_mds_client *mdsc = ceph_inode_to_client(inode)->mdsc;
3975+
struct ceph_mds_client *mdsc = ceph_inode_to_fs_client(inode)->mdsc;
39763976
struct ceph_mds_session *tsession = NULL;
39773977
struct ceph_cap *cap, *tcap, *new_cap = NULL;
39783978
struct ceph_inode_info *ci = ceph_inode(inode);
@@ -4675,7 +4675,7 @@ int ceph_drop_caps_for_unlink(struct inode *inode)
46754675

46764676
if (__ceph_caps_dirty(ci)) {
46774677
struct ceph_mds_client *mdsc =
4678-
ceph_inode_to_client(inode)->mdsc;
4678+
ceph_inode_to_fs_client(inode)->mdsc;
46794679
__cap_delay_requeue_front(mdsc, ci);
46804680
}
46814681
}
@@ -4858,7 +4858,7 @@ static int remove_capsnaps(struct ceph_mds_client *mdsc, struct inode *inode)
48584858

48594859
int ceph_purge_inode_cap(struct inode *inode, struct ceph_cap *cap, bool *invalidate)
48604860
{
4861-
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
4861+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
48624862
struct ceph_mds_client *mdsc = fsc->mdsc;
48634863
struct ceph_inode_info *ci = ceph_inode(inode);
48644864
bool is_auth;

fs/ceph/crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static bool ceph_crypt_empty_dir(struct inode *inode)
129129

130130
static const union fscrypt_policy *ceph_get_dummy_policy(struct super_block *sb)
131131
{
132-
return ceph_sb_to_client(sb)->fsc_dummy_enc_policy.policy;
132+
return ceph_sb_to_fs_client(sb)->fsc_dummy_enc_policy.policy;
133133
}
134134

135135
static struct fscrypt_operations ceph_fscrypt_ops = {

fs/ceph/dir.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx)
310310
struct ceph_dir_file_info *dfi = file->private_data;
311311
struct inode *inode = file_inode(file);
312312
struct ceph_inode_info *ci = ceph_inode(inode);
313-
struct ceph_fs_client *fsc = ceph_inode_to_client(inode);
313+
struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode);
314314
struct ceph_mds_client *mdsc = fsc->mdsc;
315315
int i;
316316
int err;
@@ -703,7 +703,7 @@ static loff_t ceph_dir_llseek(struct file *file, loff_t offset, int whence)
703703
struct dentry *ceph_handle_snapdir(struct ceph_mds_request *req,
704704
struct dentry *dentry)
705705
{
706-
struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb);
706+
struct ceph_fs_client *fsc = ceph_sb_to_fs_client(dentry->d_sb);
707707
struct inode *parent = d_inode(dentry->d_parent); /* we hold i_rwsem */
708708

709709
/* .snap dir? */
@@ -771,7 +771,7 @@ static bool is_root_ceph_dentry(struct inode *inode, struct dentry *dentry)
771771
static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry,
772772
unsigned int flags)
773773
{
774-
struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb);
774+
struct ceph_fs_client *fsc = ceph_sb_to_fs_client(dir->i_sb);
775775
struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb);
776776
struct ceph_mds_request *req;
777777
int op;
@@ -1199,7 +1199,7 @@ static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc,
11991199
struct ceph_mds_request *req)
12001200
{
12011201
struct dentry *dentry = req->r_dentry;
1202-
struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb);
1202+
struct ceph_fs_client *fsc = ceph_sb_to_fs_client(dentry->d_sb);
12031203
struct ceph_dentry_info *di = ceph_dentry(dentry);
12041204
int result = req->r_err ? req->r_err :
12051205
le32_to_cpu(req->r_reply_info.head->result);
@@ -1290,7 +1290,7 @@ static int get_caps_for_async_unlink(struct inode *dir, struct dentry *dentry)
12901290
*/
12911291
static int ceph_unlink(struct inode *dir, struct dentry *dentry)
12921292
{
1293-
struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb);
1293+
struct ceph_fs_client *fsc = ceph_sb_to_fs_client(dir->i_sb);
12941294
struct ceph_mds_client *mdsc = fsc->mdsc;
12951295
struct inode *inode = d_inode(dentry);
12961296
struct ceph_mds_request *req;
@@ -1469,7 +1469,7 @@ void __ceph_dentry_lease_touch(struct ceph_dentry_info *di)
14691469
return;
14701470
}
14711471

1472-
mdsc = ceph_sb_to_client(dn->d_sb)->mdsc;
1472+
mdsc = ceph_sb_to_fs_client(dn->d_sb)->mdsc;
14731473
spin_lock(&mdsc->dentry_list_lock);
14741474
list_move_tail(&di->lease_list, &mdsc->dentry_leases);
14751475
spin_unlock(&mdsc->dentry_list_lock);
@@ -1516,7 +1516,7 @@ void __ceph_dentry_dir_lease_touch(struct ceph_dentry_info *di)
15161516
return;
15171517
}
15181518

1519-
mdsc = ceph_sb_to_client(dn->d_sb)->mdsc;
1519+
mdsc = ceph_sb_to_fs_client(dn->d_sb)->mdsc;
15201520
spin_lock(&mdsc->dentry_list_lock);
15211521
__dentry_dir_lease_touch(mdsc, di),
15221522
spin_unlock(&mdsc->dentry_list_lock);
@@ -1530,7 +1530,7 @@ static void __dentry_lease_unlist(struct ceph_dentry_info *di)
15301530
if (list_empty(&di->lease_list))
15311531
return;
15321532

1533-
mdsc = ceph_sb_to_client(di->dentry->d_sb)->mdsc;
1533+
mdsc = ceph_sb_to_fs_client(di->dentry->d_sb)->mdsc;
15341534
spin_lock(&mdsc->dentry_list_lock);
15351535
list_del_init(&di->lease_list);
15361536
spin_unlock(&mdsc->dentry_list_lock);
@@ -1888,7 +1888,7 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags)
18881888
dentry, inode, ceph_dentry(dentry)->offset,
18891889
!!(dentry->d_flags & DCACHE_NOKEY_NAME));
18901890

1891-
mdsc = ceph_sb_to_client(dir->i_sb)->mdsc;
1891+
mdsc = ceph_sb_to_fs_client(dir->i_sb)->mdsc;
18921892

18931893
/* always trust cached snapped dentries, snapdir dentry */
18941894
if (ceph_snap(dir) != CEPH_NOSNAP) {
@@ -1995,7 +1995,7 @@ static int ceph_d_delete(const struct dentry *dentry)
19951995
static void ceph_d_release(struct dentry *dentry)
19961996
{
19971997
struct ceph_dentry_info *di = ceph_dentry(dentry);
1998-
struct ceph_fs_client *fsc = ceph_sb_to_client(dentry->d_sb);
1998+
struct ceph_fs_client *fsc = ceph_sb_to_fs_client(dentry->d_sb);
19991999

20002000
dout("d_release %p\n", dentry);
20012001

@@ -2064,7 +2064,7 @@ static ssize_t ceph_read_dir(struct file *file, char __user *buf, size_t size,
20642064
int left;
20652065
const int bufsize = 1024;
20662066

2067-
if (!ceph_test_mount_opt(ceph_sb_to_client(inode->i_sb), DIRSTAT))
2067+
if (!ceph_test_mount_opt(ceph_sb_to_fs_client(inode->i_sb), DIRSTAT))
20682068
return -EISDIR;
20692069

20702070
if (!dfi->dir_info) {

0 commit comments

Comments
 (0)