public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: [RFC PATCH 0/2] Fix up the NFS mmap code
Date: Fri, 8 Jan 2010 18:22:01 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1001081814240.7821@localhost.localdomain> (raw)
In-Reply-To: <20100109021124.GG30528@ZenIV.linux.org.uk>



On Sat, 9 Jan 2010, Al Viro wrote:
> 
> Well, sure - it steps on i_mutex-before-mmmap_sem first from ls somewhere and
> records the ordering for posterity.  Then NFS steps into mmap() (on a
> different inode) and gets conflicting ordering.

Look closer: the inodes for directories and for non-directories have 
i_mutex in different lockdep classes.

So that "on a different inode" thing should have made it a non-issue, 
since there is no actual chain back. There is "mmap_sem -> 
i_mutex_regular_file" (for mmap) and there is "i_mutex_directory -> 
mmap_sem" (for filldir), but that isn't an ABBA.

The problem _seems_ to be (if I read Andi's chain correctly) that a 
directory hasn't gone through the i_mutex_dir_key change, so filldir ends 
up being counted against the default i_mutex_key.


		Linus

  reply	other threads:[~2010-01-09  2:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1262913974.2659.101.camel@localhost>
2010-01-09  0:56 ` [RFC PATCH 0/2] Fix up the NFS mmap code Trond Myklebust
     [not found]   ` <20100109005624.7473.33215.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-01-09  0:56     ` [RFC PATCH 1/2] VFS: Add a mmap_file() callback to struct file_operations Trond Myklebust
2010-01-09  1:17     ` [RFC PATCH 0/2] Fix up the NFS mmap code Linus Torvalds
     [not found]       ` <alpine.LFD.2.00.1001081709470.7821-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-01-09  1:38         ` Al Viro
2010-01-09  1:46           ` Al Viro
2010-01-09  1:57           ` Linus Torvalds
     [not found]             ` <alpine.LFD.2.00.1001081750080.7821-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-01-09  2:11               ` Al Viro
2010-01-09  2:22                 ` Linus Torvalds [this message]
     [not found]                   ` <alpine.LFD.2.00.1001081814240.7821-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-01-09  2:30                     ` Al Viro
2010-01-09  2:40                       ` Al Viro
2010-01-09  2:43                         ` Al Viro
2010-01-10  2:00     ` Andi Kleen
2010-01-09  0:56   ` [RFC PATCH 2/2] NFS: Fix a potential deadlock in nfs_file_mmap() Trond Myklebust
     [not found]     ` <20100109005624.7473.15560.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-01-09  1:54       ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.1001081814240.7821@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox