lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 16 Apr 2018 00:14:51 -0400 From: James Simmons <jsimmons@...radead.org> To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, devel@...verdev.osuosl.org, Andreas Dilger <andreas.dilger@...el.com>, Oleg Drokin <oleg.drokin@...el.com>, NeilBrown <neilb@...e.com> Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Lustre Development List <lustre-devel@...ts.lustre.org>, Vitaly Fertman <vitaly.fertman@...gate.com>, James Simmons <jsimmons@...radead.org> Subject: [PATCH 02/22] staging: lustre: obd: create it_has_reply_body() From: Vitaly Fertman <vitaly.fertman@...gate.com> The lookup_intent it_op fields in many cases will be compared to the settings of IT_OPEN | IT_UNLINK | IT_LOOKUP | IT_GETATTR. Create a simple inline function for this common case. Signed-off-by: Vitaly Fertman <vitaly.fertman@...gate.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7433 Seagate-bug-id: MRP-3072 MRP-3137 Reviewed-on: http://review.whamcloud.com/17220 Reviewed-by: Andrew Perepechko <andrew.perepechko@...gate.com> Reviewed-by: Andriy Skulysh <andriy.skulysh@...gate.com> Tested-by: Elena V. Gryaznova <elena.gryaznova@...gate.com> Reviewed-by: John L. Hammond <john.hammond@...el.com> Reviewed-by: Lai Siyao <lai.siyao@...el.com> Reviewed-by: Oleg Drokin <oleg.drokin@...el.com> Signed-off-by: James Simmons <jsimmons@...radead.org> --- drivers/staging/lustre/lustre/include/obd.h | 10 ++++++++++ drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index f1233ca..ea6056b 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -686,6 +686,16 @@ enum md_cli_flags { CLI_MIGRATE = BIT(4), }; +/** + * GETXATTR is not included as only a couple of fields in the reply body + * is filled, but not FID which is needed for common intent handling in + * mdc_finish_intent_lock() + */ +static inline bool it_has_reply_body(const struct lookup_intent *it) +{ + return it->it_op & (IT_OPEN | IT_UNLINK | IT_LOOKUP | IT_GETATTR); +} + struct md_op_data { struct lu_fid op_fid1; /* operation fid1 (usually parent) */ struct lu_fid op_fid2; /* operation fid2 (usually child) */ diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 695ef44..309ead1 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -568,7 +568,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, it->it_op, it->it_disposition, it->it_status); /* We know what to expect, so we do any byte flipping required here */ - if (it->it_op & (IT_OPEN | IT_UNLINK | IT_LOOKUP | IT_GETATTR)) { + if (it_has_reply_body(it)) { struct mdt_body *body; body = req_capsule_server_get(pill, &RMF_MDT_BODY); -- 1.8.3.1
Powered by blists - more mailing lists