From 2b0b8c011d5709cc18926a8cb08f7e499f2176ad Mon Sep 17 00:00:00 2001
From: johann <johann>
Date: Tue, 5 Jun 2007 07:22:51 +0000
Subject: [PATCH] Branch b1_6

Release the module reference in ll_kern_mount()

b=12546
i=green
i=shadow
---
 lustre/ChangeLog                       | 7 +++++++
 lustre/include/linux/lustre_compat25.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/lustre/ChangeLog b/lustre/ChangeLog
index 2d43623151..68ca7e7843 100644
--- a/lustre/ChangeLog
+++ b/lustre/ChangeLog
@@ -14,6 +14,13 @@ tbd         Cluster File Systems, Inc. <info@clusterfs.com>
        * Note that reiserfs quotas are disabled on SLES 10 in this kernel.
        * bug fixes
 
+Severity   : normal
+Frequency  : 2.6.18 servers only
+Bugzilla   : 12546
+Description: ll_kern_mount() doesn't release the module reference
+Details    : The ldiskfs module reference count never drops down to 0
+	     because ll_kern_mount() doesn't release the module reference.
+
 Severity   : normal
 Frequency  : rare
 Bugzilla   : 12470
diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h
index 7e69bce00f..02248ac610 100644
--- a/lustre/include/linux/lustre_compat25.h
+++ b/lustre/include/linux/lustre_compat25.h
@@ -497,6 +497,7 @@ ll_kern_mount(const char *fstype, int flags, const char *name, void *data)
         if (!type)
                 return ERR_PTR(-ENODEV);
         mnt = vfs_kern_mount(type, flags, name, data);
+        module_put(type->owner);
         return mnt;
 }
 #else
-- 
GitLab