aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/mdc/mdc_locks.c
diff options
context:
space:
mode:
authorAndreas Dilger <andreas.dilger@intel.com>2016-11-23 17:59:47 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-29 21:45:15 +0100
commit3dea34781956f3865755a29e9189ca2140eba753 (patch)
treefaa2ff4feab0fa3d1fe66c75bde9b5cb323121bf /drivers/staging/lustre/lustre/mdc/mdc_locks.c
parentstaging: lustre: lnet: memory corruption in selftest (diff)
downloadlinux-dev-3dea34781956f3865755a29e9189ca2140eba753.tar.xz
linux-dev-3dea34781956f3865755a29e9189ca2140eba753.zip
staging: lustre: ldlm: remove ldlm_policy_data_t typedef usage from code
Replace usage of ldlm_policy_data_t with named enums to conform to upstream coding style. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: http://review.whamcloud.com/15300 Reviewed-on: http://review.whamcloud.com/15301 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/mdc/mdc_locks.c')
-rw-r--r--drivers/staging/lustre/lustre/mdc/mdc_locks.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index 42a128faf03c..6494c5bd99d1 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -131,7 +131,8 @@ int mdc_set_lock_data(struct obd_export *exp, const struct lustre_handle *lockh,
enum ldlm_mode mdc_lock_match(struct obd_export *exp, __u64 flags,
const struct lu_fid *fid, enum ldlm_type type,
- ldlm_policy_data_t *policy, enum ldlm_mode mode,
+ union ldlm_policy_data *policy,
+ enum ldlm_mode mode,
struct lustre_handle *lockh)
{
struct ldlm_res_id res_id;
@@ -147,7 +148,7 @@ enum ldlm_mode mdc_lock_match(struct obd_export *exp, __u64 flags,
int mdc_cancel_unused(struct obd_export *exp,
const struct lu_fid *fid,
- ldlm_policy_data_t *policy,
+ union ldlm_policy_data *policy,
enum ldlm_mode mode,
enum ldlm_cancel_flags flags,
void *opaque)
@@ -686,20 +687,20 @@ static int mdc_finish_enqueue(struct obd_export *exp,
* we don't know in advance the file type.
*/
int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
- const ldlm_policy_data_t *policy,
+ const union ldlm_policy_data *policy,
struct lookup_intent *it, struct md_op_data *op_data,
struct lustre_handle *lockh, u64 extra_lock_flags)
{
- static const ldlm_policy_data_t lookup_policy = {
+ static const union ldlm_policy_data lookup_policy = {
.l_inodebits = { MDS_INODELOCK_LOOKUP }
};
- static const ldlm_policy_data_t update_policy = {
+ static const union ldlm_policy_data update_policy = {
.l_inodebits = { MDS_INODELOCK_UPDATE }
};
- static const ldlm_policy_data_t layout_policy = {
+ static const union ldlm_policy_data layout_policy = {
.l_inodebits = { MDS_INODELOCK_LAYOUT }
};
- static const ldlm_policy_data_t getxattr_policy = {
+ static const union ldlm_policy_data getxattr_policy = {
.l_inodebits = { MDS_INODELOCK_XATTR }
};
struct obd_device *obddev = class_exp2obd(exp);
@@ -925,7 +926,7 @@ static int mdc_finish_intent_lock(struct obd_export *exp,
*/
lock = ldlm_handle2lock(lockh);
if (lock) {
- ldlm_policy_data_t policy = lock->l_policy_data;
+ union ldlm_policy_data policy = lock->l_policy_data;
LDLM_DEBUG(lock, "matching against this");
@@ -961,7 +962,7 @@ int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it,
*/
struct ldlm_res_id res_id;
struct lustre_handle lockh;
- ldlm_policy_data_t policy;
+ union ldlm_policy_data policy;
enum ldlm_mode mode;
if (it->it_lock_handle) {
@@ -1163,10 +1164,9 @@ int mdc_intent_getattr_async(struct obd_export *exp,
* for statahead currently. Consider CMD in future, such two bits
* maybe managed by different MDS, should be adjusted then.
*/
- ldlm_policy_data_t policy = {
- .l_inodebits = { MDS_INODELOCK_LOOKUP |
- MDS_INODELOCK_UPDATE }
- };
+ union ldlm_policy_data policy = {
+ .l_inodebits = { MDS_INODELOCK_LOOKUP | MDS_INODELOCK_UPDATE }
+ };
int rc = 0;
__u64 flags = LDLM_FL_HAS_INTENT;