Re: [PATCH 05/22] staging: lustre: lmv: remove nlink check in lmv_revalidate_slaves

2016-12-05 Thread Dan Carpenter
On Fri, Dec 02, 2016 at 07:53:12PM -0500, James Simmons wrote:
> From: wang di 
> 
> Remove nlink < 2 check in lmv_revalidate_slaves, because
> after nlink reaches to LDISKFS_LINK_MAX (65000), the inode
> nlink will be set to 1.
> 

I don't understand how this changelog matches the patch...

The changelog says we're removing a check but really this is a NULL
dereference fix, right?  We're not really removing a check at all, just
changing it for something else.  We do remove a printk, though.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/22] staging: lustre: lmv: remove nlink check in lmv_revalidate_slaves

2016-12-02 Thread James Simmons
From: wang di 

Remove nlink < 2 check in lmv_revalidate_slaves, because
after nlink reaches to LDISKFS_LINK_MAX (65000), the inode
nlink will be set to 1.

Signed-off-by: wang di 
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6984
Reviewed-on: http://review.whamcloud.com/16490
Reviewed-by: James Simmons 
Reviewed-by: Jian Yu 
Reviewed-by: Oleg Drokin 
Signed-off-by: James Simmons 
---
 drivers/staging/lustre/lustre/lmv/lmv_intent.c |   16 +---
 1 files changed, 1 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lmv/lmv_intent.c 
b/drivers/staging/lustre/lustre/lmv/lmv_intent.c
index b1071cf..aa42066 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_intent.c
+++ b/drivers/staging/lustre/lustre/lmv/lmv_intent.c
@@ -220,21 +220,7 @@ int lmv_revalidate_slaves(struct obd_export *exp,
/* refresh slave from server */
body = req_capsule_server_get(>rq_pill,
  _MDT_BODY);
-   LASSERT(body);
-
-   if (unlikely(body->mbo_nlink < 2)) {
-   /*
-* If this is bad stripe, most likely due
-* to the race between close(unlink) and
-* getattr, let's return -EONENT, so llite
-* will revalidate the dentry see
-* ll_inode_revalidate_fini()
-*/
-   CDEBUG(D_INODE, "%s: nlink %d < 2 corrupt 
stripe %d "DFID":" DFID"\n",
-  obd->obd_name, body->mbo_nlink, i,
-  PFID(>lsm_md_oinfo[i].lmo_fid),
-  PFID(>lsm_md_oinfo[0].lmo_fid));
-
+   if (!body) {
if (it.it_lock_mode && lockh) {
ldlm_lock_decref(lockh, 
it.it_lock_mode);
it.it_lock_mode = 0;
-- 
1.7.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel