From patchwork Mon Dec 3 22:04:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris J Arges X-Patchwork-Id: 203447 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 1F6EA2C00A3 for ; Tue, 4 Dec 2012 09:04:08 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tfe7L-0001wl-0V; Mon, 03 Dec 2012 22:03:59 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tfe7I-0001vK-Au for kernel-team@lists.ubuntu.com; Mon, 03 Dec 2012 22:03:56 +0000 Received: from cpe-70-112-44-241.austin.res.rr.com ([70.112.44.241] helo=[192.168.1.117]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Tfe7I-0004Re-2s for kernel-team@lists.ubuntu.com; Mon, 03 Dec 2012 22:03:56 +0000 Message-ID: <50BD21D6.2030106@canonical.com> Date: Mon, 03 Dec 2012 16:04:06 -0600 From: Chris J Arges User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Ubuntu Kernel Team Subject: [Raring] pull-request: fsnotify: simplify locking X-Enigmail-Version: 1.4.6 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Hi, I have taken a set of patches that have fixed bug 922906 [1] and applied them to raring. The original patches were found here [2]. I re-tested with this code, and the test-case does not seem to fail for an extended run. A few notes: * fanotify: add an extra flag to mark_remove_from_mask * fsnotify: pass group to fsnotify_destroy_mark() These patches required minor modifications because line numbers changed from the time these original patches were produced. [1] http://bugs.launchpad.net/bugs/922906 [2] https://lkml.org/lkml/2011/1/19/213 --chris j arges --- The following changes since commit ef2b90a5c8f24f3c9a0d3d0e46a6df7909c1160a: UBUNTU: Ubuntu-3.7.0-4.12 (2012-11-27 12:37:59 -0800) are available in the git repository at: git://kernel.ubuntu.com/arges/ubuntu-raring.git lp922906 for you to fetch changes up to a86bafb9a8239392ac6d7ebf4028982834987cc0: UBUNTU: SAUCE: fsnotify: change locking order (2012-12-03 15:05:18 -0600) ---------------------------------------------------------------- Lino Sanfilippo (10): UBUNTU: SAUCE: inotify, fanotify: replace fsnotify_put_group() with fsnotify_destroy_group() UBUNTU: SAUCE: fsnotify: introduce fsnotify_get_group() UBUNTU: SAUCE: fsnotify: use reference counting for groups UBUNTU: SAUCE: fsnotify: take groups mark_lock before mark lock UBUNTU: SAUCE: fanotify: add an extra flag to mark_remove_from_mask that indicates wheather a mark should be destroyed UBUNTU: SAUCE: fsnotify: use a mutex instead of a spinlock to protect a groups mark list UBUNTU: SAUCE: fsnotify: pass group to fsnotify_destroy_mark() UBUNTU: SAUCE: fsnotify: introduce locked versions of fsnotify_add_mark() and fsnotify_remove_mark() UBUNTU: SAUCE: fsnotify: dont put marks on temporary list when clearing marks by group UBUNTU: SAUCE: fsnotify: change locking order fs/notify/dnotify/dnotify.c | 4 +- fs/notify/fanotify/fanotify_user.c | 33 +++++++----- fs/notify/group.c | 40 +++++++-------- fs/notify/inode_mark.c | 14 ++++-- fs/notify/inotify/inotify_fsnotify.c | 4 +- fs/notify/inotify/inotify_user.c | 11 ++-- fs/notify/mark.c | 91 +++++++++++++++++++--------------- fs/notify/vfsmount_mark.c | 14 ++++-- include/linux/fsnotify_backend.h | 26 ++++++---- kernel/audit_tree.c | 10 ++-- kernel/audit_watch.c | 4 +- 11 files changed, 147 insertions(+), 104 deletions(-)