From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([66.187.233.31]:51080 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757352AbXI1IBl (ORCPT ); Fri, 28 Sep 2007 04:01:41 -0400 Message-Id: <20070928080042.396947000@chello.nl> References: <20070928074200.436463000@chello.nl> Date: Fri, 28 Sep 2007 09:42:09 +0200 From: Peter Zijlstra Subject: [PATCH 09/12] lockdep: add a page lock class per filesystem type Content-Disposition: inline; filename=lockdep-fs-page.patch Sender: linux-arch-owner@vger.kernel.org To: lkml , linux-arch@vger.kernel.org Cc: Zach Brown , Ingo Molnar , akpm@linux-foundation.org, Peter Zijlstra List-ID: Provide a different page lock class per filesystem, so we can properly express the neseting relations between filesystems. Signed-off-by: Peter Zijlstra --- fs/filesystems.c | 1 + include/linux/fs.h | 5 +++++ 2 files changed, 6 insertions(+) Index: linux-2.6/fs/filesystems.c =================================================================== --- linux-2.6.orig/fs/filesystems.c +++ linux-2.6/fs/filesystems.c @@ -73,6 +73,7 @@ int register_filesystem(struct file_syst if (fs->next) return -EBUSY; INIT_LIST_HEAD(&fs->fs_supers); + lockdep_init_map(&fs->s_mapping_map, fs->name, &fs->s_mapping_key, 0); write_lock(&file_systems_lock); p = find_filesystem(fs->name, strlen(fs->name)); if (*p) Index: linux-2.6/include/linux/fs.h =================================================================== --- linux-2.6.orig/include/linux/fs.h +++ linux-2.6/include/linux/fs.h @@ -1302,8 +1302,13 @@ struct file_system_type { struct module *owner; struct file_system_type * next; struct list_head fs_supers; + struct lock_class_key s_lock_key; struct lock_class_key s_umount_key; + struct lock_class_key s_mapping_key; +#ifdef CONFIG_DEBUG_LOCK_ALLOC + struct lockdep_map s_mapping_map; +#endif }; extern int get_sb_bdev(struct file_system_type *fs_type, --