lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1363366257-4886-7-git-send-email-laijs@cn.fujitsu.com>
Date:	Sat, 16 Mar 2013 00:50:54 +0800
From:	Lai Jiangshan <laijs@...fujitsu.com>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Cc:	Lai Jiangshan <laijs@...fujitsu.com>,
	Eric Paris <eparis@...isplace.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	Sasha Levin <sasha.levin@...cle.com>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Eric Paris <eparis@...hat.com>,
	Lino Sanfilippo <LinoSanfilippo@....de>
Subject: [PATCH 6/9] fsnotify: use DEFINE_SRCU() for srcu_struct

DEFINE_STATIC_SRCU() defines srcu struct and do init at build time.

Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
Cc: Eric Paris <eparis@...isplace.org>
---
 fs/notify/fsnotify.c |    6 ------
 fs/notify/mark.c     |    2 +-
 2 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/fs/notify/fsnotify.c b/fs/notify/fsnotify.c
index 4bb21d6..aba962a 100644
--- a/fs/notify/fsnotify.c
+++ b/fs/notify/fsnotify.c
@@ -298,14 +298,8 @@ EXPORT_SYMBOL_GPL(fsnotify);
 
 static __init int fsnotify_init(void)
 {
-	int ret;
-
 	BUG_ON(hweight32(ALL_FSNOTIFY_EVENTS) != 23);
 
-	ret = init_srcu_struct(&fsnotify_mark_srcu);
-	if (ret)
-		panic("initializing fsnotify_mark_srcu");
-
 	return 0;
 }
 core_initcall(fsnotify_init);
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index fc6b49b..aeededc 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -97,7 +97,7 @@
 #include <linux/fsnotify_backend.h>
 #include "fsnotify.h"
 
-struct srcu_struct fsnotify_mark_srcu;
+DEFINE_SRCU(fsnotify_mark_srcu);
 static DEFINE_SPINLOCK(destroy_lock);
 static LIST_HEAD(destroy_list);
 static DECLARE_WAIT_QUEUE_HEAD(destroy_waitq);
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ