ceph: remove ceph_mdsc_lease_release
Nothing calls it. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Yan, Zheng <zyan@redhat.com>
This commit is contained in:
Родитель
9b16f03c47
Коммит
8aa152c778
|
@ -3291,47 +3291,6 @@ void ceph_mdsc_lease_send_msg(struct ceph_mds_session *session,
|
|||
ceph_con_send(&session->s_con, msg);
|
||||
}
|
||||
|
||||
/*
|
||||
* Preemptively release a lease we expect to invalidate anyway.
|
||||
* Pass @inode always, @dentry is optional.
|
||||
*/
|
||||
void ceph_mdsc_lease_release(struct ceph_mds_client *mdsc, struct inode *inode,
|
||||
struct dentry *dentry)
|
||||
{
|
||||
struct ceph_dentry_info *di;
|
||||
struct ceph_mds_session *session;
|
||||
u32 seq;
|
||||
|
||||
BUG_ON(inode == NULL);
|
||||
BUG_ON(dentry == NULL);
|
||||
|
||||
/* is dentry lease valid? */
|
||||
spin_lock(&dentry->d_lock);
|
||||
di = ceph_dentry(dentry);
|
||||
if (!di || !di->lease_session ||
|
||||
di->lease_session->s_mds < 0 ||
|
||||
di->lease_gen != di->lease_session->s_cap_gen ||
|
||||
!time_before(jiffies, di->time)) {
|
||||
dout("lease_release inode %p dentry %p -- "
|
||||
"no lease\n",
|
||||
inode, dentry);
|
||||
spin_unlock(&dentry->d_lock);
|
||||
return;
|
||||
}
|
||||
|
||||
/* we do have a lease on this dentry; note mds and seq */
|
||||
session = ceph_get_mds_session(di->lease_session);
|
||||
seq = di->lease_seq;
|
||||
__ceph_mdsc_drop_dentry_lease(dentry);
|
||||
spin_unlock(&dentry->d_lock);
|
||||
|
||||
dout("lease_release inode %p dentry %p to mds%d\n",
|
||||
inode, dentry, session->s_mds);
|
||||
ceph_mdsc_lease_send_msg(session, inode, dentry,
|
||||
CEPH_MDS_LEASE_RELEASE, seq);
|
||||
ceph_put_mds_session(session);
|
||||
}
|
||||
|
||||
/*
|
||||
* drop all leases (and dentry refs) in preparation for umount
|
||||
*/
|
||||
|
|
|
@ -385,10 +385,6 @@ extern void ceph_mdsc_destroy(struct ceph_fs_client *fsc);
|
|||
|
||||
extern void ceph_mdsc_sync(struct ceph_mds_client *mdsc);
|
||||
|
||||
extern void ceph_mdsc_lease_release(struct ceph_mds_client *mdsc,
|
||||
struct inode *inode,
|
||||
struct dentry *dn);
|
||||
|
||||
extern void ceph_invalidate_dir_request(struct ceph_mds_request *req);
|
||||
extern int ceph_alloc_readdir_reply_buffer(struct ceph_mds_request *req,
|
||||
struct inode *dir);
|
||||
|
|
Загрузка…
Ссылка в новой задаче