Skip to content

Commit 045100c

Browse files
jtlaytonidryomov
authored andcommitted
ceph: close holes in structs ceph_mds_session and ceph_mds_request
Move s_ref up to plug a 4 byte hole, which plugs another. Move r_kref to shave 8 bytes off per request on x86_64. Signed-off-by: Jeff Layton <[email protected]> Reviewed-by: "Yan, Zheng" <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent a55e601 commit 045100c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ceph/mds_client.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ struct ceph_mds_session {
184184

185185
/* protected by s_cap_lock */
186186
spinlock_t s_cap_lock;
187+
refcount_t s_ref;
187188
struct list_head s_caps; /* all caps issued by this session */
188189
struct ceph_cap *s_cap_iterator;
189190
int s_nr_caps;
@@ -198,7 +199,6 @@ struct ceph_mds_session {
198199
unsigned long s_renew_requested; /* last time we sent a renew req */
199200
u64 s_renew_seq;
200201

201-
refcount_t s_ref;
202202
struct list_head s_waiting; /* waiting requests */
203203
struct list_head s_unsafe; /* unsafe requests */
204204
};
@@ -234,6 +234,7 @@ struct ceph_mds_request {
234234
struct rb_node r_node;
235235
struct ceph_mds_client *r_mdsc;
236236

237+
struct kref r_kref;
237238
int r_op; /* mds op code */
238239

239240
/* operation on what? */
@@ -304,7 +305,6 @@ struct ceph_mds_request {
304305
int r_resend_mds; /* mds to resend to next, if any*/
305306
u32 r_sent_on_mseq; /* cap mseq request was sent at*/
306307

307-
struct kref r_kref;
308308
struct list_head r_wait;
309309
struct completion r_completion;
310310
struct completion r_safe_completion;

0 commit comments

Comments
 (0)