Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc30c172 authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman
Browse files

staging/lustre: const correct set_lock_data()



Change the __u64 *cookie parameter of md_ops->set_lock_data() to
const struct lustre_handle *lockh.

Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/17072
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7403


Reviewed-by: default avatarFrank Zago <fzago@cray.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 107b40ad
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1023,7 +1023,8 @@ struct md_ops {
				    struct lookup_intent *);
	int (*clear_open_replay_data)(struct obd_export *,
				      struct obd_client_handle *);
	int (*set_lock_data)(struct obd_export *, __u64 *, void *, __u64 *);
	int (*set_lock_data)(struct obd_export *, const struct lustre_handle *,
			     void *, __u64 *);

	enum ldlm_mode (*lock_match)(struct obd_export *, __u64,
				     const struct lu_fid *, enum ldlm_type,
+2 −1
Original line number Diff line number Diff line
@@ -1610,7 +1610,8 @@ static inline int md_clear_open_replay_data(struct obd_export *exp,
}

static inline int md_set_lock_data(struct obd_export *exp,
				   __u64 *lockh, void *data, __u64 *bits)
				   const struct lustre_handle *lockh,
				   void *data, __u64 *bits)
{
	EXP_CHECK_MD_OP(exp, set_lock_data);
	EXP_MD_COUNTER_INCREMENT(exp, set_lock_data);
+1 −1
Original line number Diff line number Diff line
@@ -3629,7 +3629,7 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode,
		   PFID(&lli->lli_fid), inode, reconf);

	/* in case this is a caching lock and reinstate with new inode */
	md_set_lock_data(sbi->ll_md_exp, &lockh->cookie, inode, NULL);
	md_set_lock_data(sbi->ll_md_exp, lockh, inode, NULL);

	lock_res_and_lock(lock);
	lvb_ready = ldlm_is_lvb_ready(lock);
+2 −3
Original line number Diff line number Diff line
@@ -1243,7 +1243,7 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode,
			CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"%p for remote lock %#llx\n",
			       PFID(ll_inode2fid(inode)), inode,
			       handle.cookie);
			md_set_lock_data(exp, &handle.cookie, inode, NULL);
			md_set_lock_data(exp, &handle, inode, NULL);
		}

		handle.cookie = it->it_lock_handle;
@@ -1251,8 +1251,7 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode,
		CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"%p for lock %#llx\n",
		       PFID(ll_inode2fid(inode)), inode, handle.cookie);

		md_set_lock_data(exp, &handle.cookie, inode,
				 &it->it_lock_bits);
		md_set_lock_data(exp, &handle, inode, &it->it_lock_bits);
		it->it_lock_set = 1;
	}

+1 −1
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ int lmv_revalidate_slaves(struct obd_export *exp, struct mdt_body *mbody,
				ptlrpc_req_finished(req);
		}

		md_set_lock_data(tgt->ltd_exp, &lockh->cookie, inode, NULL);
		md_set_lock_data(tgt->ltd_exp, lockh, inode, NULL);

		if (i != 0)
			nlink += inode->i_nlink - 2;
Loading