Whamcloud - gitweb
LU-17696 llite: remove LASSERT from ll_ddelete() 76/54676/2
authorJian Yu <yujian@whamcloud.com>
Thu, 4 Apr 2024 21:30:19 +0000 (14:30 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 15 Apr 2024 16:51:31 +0000 (16:51 +0000)
On Linux kernel 6.8, the changes in commit 2f42f1eb9093
("Call retain_dentry() with refcount 0") made d_delete()
instances called for dentries with ->d_lock held and
refcount equal to 0, which caused the following assertion
failure on Lustre client:

(dcache.c:136:ll_ddelete()) ASSERTION( d_count(de) == 1 ) failed

The value of d_count(de) became 0 instead of 1. Since
retain_dentry() was called either with refcount 0 or 1,
we can simply remove the LASSERT(ll_d_count(de) == 1)
from ll_ddelete() to avoid the above failure.

Change-Id: Ic4a39d9328326634190cd0719b4c0637e1bf315c
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54676
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/dcache.c

index 9fdd487..60299c9 100644 (file)
@@ -133,9 +133,6 @@ static int ll_ddelete(const struct dentry *de)
               d_unhashed((struct dentry *)de) ? "" : "hashed,",
               list_empty(&de->d_subdirs) ? "" : "subdirs");
 
-       /* kernel >= 2.6.38 last refcount is decreased after this function. */
-       LASSERT(ll_d_count(de) == 1);
-
        if (d_lustre_invalid(de))
                RETURN(1);
        RETURN(0);