Commit 52311980 authored by Jeff Layton's avatar Jeff Layton Committed by Ilya Dryomov

ceph: drop separate mdsc argument from __send_cap

We can get it from the session if we need it.
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent c403c3a2
...@@ -1454,8 +1454,7 @@ static void __prep_cap(struct cap_msg_args *arg, struct ceph_cap *cap, ...@@ -1454,8 +1454,7 @@ static void __prep_cap(struct cap_msg_args *arg, struct ceph_cap *cap,
* *
* Caller should hold snap_rwsem (read), s_mutex. * Caller should hold snap_rwsem (read), s_mutex.
*/ */
static void __send_cap(struct ceph_mds_client *mdsc, struct cap_msg_args *arg, static void __send_cap(struct cap_msg_args *arg, struct ceph_inode_info *ci)
struct ceph_inode_info *ci)
{ {
struct inode *inode = &ci->vfs_inode; struct inode *inode = &ci->vfs_inode;
int ret; int ret;
...@@ -1467,7 +1466,7 @@ static void __send_cap(struct ceph_mds_client *mdsc, struct cap_msg_args *arg, ...@@ -1467,7 +1466,7 @@ static void __send_cap(struct ceph_mds_client *mdsc, struct cap_msg_args *arg,
ceph_vinop(inode), ceph_cap_string(arg->dirty), ceph_vinop(inode), ceph_cap_string(arg->dirty),
arg->flush_tid); arg->flush_tid);
spin_lock(&ci->i_ceph_lock); spin_lock(&ci->i_ceph_lock);
__cap_delay_requeue(mdsc, ci); __cap_delay_requeue(arg->session->s_mdsc, ci);
spin_unlock(&ci->i_ceph_lock); spin_unlock(&ci->i_ceph_lock);
} }
...@@ -2147,7 +2146,7 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags, ...@@ -2147,7 +2146,7 @@ void ceph_check_caps(struct ceph_inode_info *ci, int flags,
want, retain, flushing, flush_tid, oldest_flush_tid); want, retain, flushing, flush_tid, oldest_flush_tid);
spin_unlock(&ci->i_ceph_lock); spin_unlock(&ci->i_ceph_lock);
__send_cap(mdsc, &arg, ci); __send_cap(&arg, ci);
goto retry; /* retake i_ceph_lock and restart our cap scan. */ goto retry; /* retake i_ceph_lock and restart our cap scan. */
} }
...@@ -2221,7 +2220,7 @@ static int try_flush_caps(struct inode *inode, u64 *ptid) ...@@ -2221,7 +2220,7 @@ static int try_flush_caps(struct inode *inode, u64 *ptid)
flushing, flush_tid, oldest_flush_tid); flushing, flush_tid, oldest_flush_tid);
spin_unlock(&ci->i_ceph_lock); spin_unlock(&ci->i_ceph_lock);
__send_cap(mdsc, &arg, ci); __send_cap(&arg, ci);
} else { } else {
if (!list_empty(&ci->i_cap_flush_list)) { if (!list_empty(&ci->i_cap_flush_list)) {
struct ceph_cap_flush *cf = struct ceph_cap_flush *cf =
...@@ -2435,7 +2434,7 @@ static void __kick_flushing_caps(struct ceph_mds_client *mdsc, ...@@ -2435,7 +2434,7 @@ static void __kick_flushing_caps(struct ceph_mds_client *mdsc,
(cap->issued | cap->implemented), (cap->issued | cap->implemented),
cf->caps, cf->tid, oldest_flush_tid); cf->caps, cf->tid, oldest_flush_tid);
spin_unlock(&ci->i_ceph_lock); spin_unlock(&ci->i_ceph_lock);
__send_cap(mdsc, &arg, ci); __send_cap(&arg, ci);
} else { } else {
struct ceph_cap_snap *capsnap = struct ceph_cap_snap *capsnap =
container_of(cf, struct ceph_cap_snap, container_of(cf, struct ceph_cap_snap,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment