Whamcloud - gitweb
LU-18517 quota: fix LC_HAVE_DQUOT_QC_DQBLK check 20/57320/4
authorSohei Koyama <skoyama@ddn.com>
Fri, 6 Dec 2024 04:12:39 +0000 (13:12 +0900)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Dec 2024 08:20:11 +0000 (08:20 +0000)
When compiling with clang, the HAVE_DQUOT_QC_DQBLK check always
fails with "error: indirection of non-volatile null pointer will
be deleted, not trap".

Signed-off-by: Sohei Koyama <skoyama@ddn.com>
Change-Id: I8cbdfd70bef8164e40d19d68dc4127c6f40bd693
Test-Parameters: trivial
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57320
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
lustre/autoconf/lustre-core.m4

index f201ffd..6243a4c 100644 (file)
@@ -1246,7 +1246,10 @@ AC_DEFUN([LC_SRC_HAVE_DQUOT_QC_DQBLK], [
                #include <linux/fs.h>
                #include <linux/quota.h>
        ],[
-               ((struct quotactl_ops *)0)->set_dqblk(NULL, *((struct kqid*)0), (struct qc_dqblk*)0);
+                       struct quotactl_ops *ops = NULL;
+                       struct kqid kqid = { .type = USRQUOTA };
+                       struct qc_dqblk *qc = NULL;
+                       ops->set_dqblk(NULL, kqid, qc);
        ],[-Werror])
 ])
 AC_DEFUN([LC_HAVE_DQUOT_QC_DQBLK], [