bcc/tools: update mountsnoop's based on comment in containers.py
authorsum12 <sumitjami@gmail.com>
Tue, 20 Jul 2021 14:47:48 +0000 (16:47 +0200)
committeryonghong-song <ys114321@gmail.com>
Tue, 20 Jul 2021 16:32:06 +0000 (09:32 -0700)
this patch just replicates the fix done in
ef330a393be4b472627b1bfa7fbe50934e519e25

tools/mountsnoop.py

index 667ea35cd9f13359bd2a602651122a096172671b..250927f5e7db027c955d00e07abbef28c15e575a 100755 (executable)
@@ -33,7 +33,10 @@ bpf_text = r"""
  * real struct, but we don't need them, and they're more likely to change.
  */
 struct mnt_namespace {
+    // This field was removed in https://github.com/torvalds/linux/commit/1a7b8969e664d6af328f00fe6eb7aabd61a71d13
+    #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0)
     atomic_t count;
+    #endif
     struct ns_common ns;
 };