patch unionfs-debug-fixes.patch
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 10 Feb 2012 20:36:43 +0000 (15:36 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Sun, 24 Nov 2013 18:38:17 +0000 (13:38 -0500)
fs/unionfs/debug.c

index c07f6976fdb6a9ce1201e340555c1181f7059fd2..21ce90cbcf8a6a03a2f6618e4a51c72587a44430 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include "union.h"
+#include "../mount.h"
 
 /*
  * Helper debugging functions for maintainers (and for users to report back
@@ -445,17 +446,18 @@ void __unionfs_check_nd(const struct nameidata *nd,
 
 static unsigned int __mnt_get_count(struct vfsmount *mnt)
 {
+       struct mount *m = real_mount(mnt);
 #ifdef CONFIG_SMP
        unsigned int count = 0;
        int cpu;
 
        for_each_possible_cpu(cpu) {
-               count += per_cpu_ptr(mnt->mnt_pcp, cpu)->mnt_count;
+               count += per_cpu_ptr(m->mnt_pcp, cpu)->mnt_count;
        }
 
        return count;
 #else
-       return mnt->mnt_count;
+       return m->mnt_count;
 #endif
 }