Whamcloud - gitweb
LU-14073 ptlrpc: remove debugging assert using segment_eq() 97/40797/4
authorAurelien Degremont <degremoa@amazon.com>
Fri, 13 Nov 2020 16:17:37 +0000 (16:17 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 9 Dec 2020 07:48:26 +0000 (07:48 +0000)
In Linux 5.9-rc1 commit 428e2976a5, segment_eq() is removed as it was
only used in uaccess_kernel(). But uaccess_kernel() was introduced in Linux
v4.12-rc1, which does not cover all supported kernel versions.

As segment_eq() is only used in 1 actual debugging call, avoid adding a
new configuration test for uaccess_kernel() and just remove the 2
related LASSERTs.

Test-Parameters: trivial
Signed-off-by: Aurelien Degremont <degremoa@amazon.com>
Change-Id: I1595e9b085176d2106a2b958e1fd6f4031cc2f69
Reviewed-on: https://review.whamcloud.com/40797
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Neil Brown <neilb@suse.de>

index 6342749..fffb7f2 100644 (file)
 /* Debugging check only needed during development */
-# define ASSERT_NOT_KERNEL_CTXT(msg) LASSERTF(!segment_eq(get_fs(), KERNEL_DS),\
-                                             msg)
-# define ASSERT_KERNEL_CTXT(msg) LASSERTF(segment_eq(get_fs(), KERNEL_DS), msg)
 # define ASSERT_CTXT_MAGIC(magic) do {} while(0)
-# define ASSERT_NOT_KERNEL_CTXT(msg) do {} while(0)
-# define ASSERT_KERNEL_CTXT(msg) do {} while(0)
 static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt,
@@ -74,7 +69,6 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx)
        if (new_ctx->dt != NULL)
-       //ASSERT_NOT_KERNEL_CTXT("already in kernel context!\n");
@@ -103,7 +97,6 @@ void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx)
-       ASSERT_KERNEL_CTXT("popping non-kernel context!\n");
        LASSERTF(current->fs->pwd.dentry == new_ctx->pwd, "%p != %p\n",
                 current->fs->pwd.dentry, new_ctx->pwd);