<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/include/linux, branch v3.1-rc6</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>regulator: fix kernel-doc warning in consumer.h</title>
<updated>2011-09-08T21:43:03+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2011-09-08T17:16:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bff747c58cf97bf4fc8b499ee0f419b59d6b226d'/>
<id>bff747c58cf97bf4fc8b499ee0f419b59d6b226d</id>
<content type='text'>
Fix kernel-doc warning about internal/private data by marking it
as "private:" so that kernel-doc will ignore it.

  Warning(include/linux/regulator/consumer.h:128): No description found for parameter 'ret'

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Acked-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix kernel-doc warning about internal/private data by marking it
as "private:" so that kernel-doc will ignore it.

  Warning(include/linux/regulator/consumer.h:128): No description found for parameter 'ret'

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Acked-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf events: Fix slow and broken cgroup context switch code</title>
<updated>2011-08-29T10:28:33+00:00</updated>
<author>
<name>Stephane Eranian</name>
<email>eranian@google.com</email>
</author>
<published>2011-08-25T13:58:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a8d757ef076f0f95f13a918808824058de25b3eb'/>
<id>a8d757ef076f0f95f13a918808824058de25b3eb</id>
<content type='text'>
The current cgroup context switch code was incorrect leading
to bogus counts. Furthermore, as soon as there was an active
cgroup event on a CPU, the context switch cost on that CPU
would increase by a significant amount as demonstrated by a
simple ping/pong example:

 $ ./pong
 Both processes pinned to CPU1, running for 10s
 10684.51 ctxsw/s

Now start a cgroup perf stat:
 $ perf stat -e cycles,cycles -A -a -G test  -C 1 -- sleep 100

$ ./pong
 Both processes pinned to CPU1, running for 10s
 6674.61 ctxsw/s

That's a 37% penalty.

Note that pong is not even in the monitored cgroup.

The results shown by perf stat are bogus:
 $ perf stat -e cycles,cycles -A -a -G test  -C 1 -- sleep 100

 Performance counter stats for 'sleep 100':

 CPU1 &lt;not counted&gt; cycles   test
 CPU1 16,984,189,138 cycles  #    0.000 GHz

The second 'cycles' event should report a count @ CPU clock
(here 2.4GHz) as it is counting across all cgroups.

The patch below fixes the bogus accounting and bypasses any
cgroup switches in case the outgoing and incoming tasks are
in the same cgroup.

With this patch the same test now yields:
 $ ./pong
 Both processes pinned to CPU1, running for 10s
 10775.30 ctxsw/s

Start perf stat with cgroup:

 $ perf stat -e cycles,cycles -A -a -G test  -C 1 -- sleep 10

Run pong outside the cgroup:
 $ /pong
 Both processes pinned to CPU1, running for 10s
 10687.80 ctxsw/s

The penalty is now less than 2%.

And the results for perf stat are correct:

$ perf stat -e cycles,cycles -A -a -G test  -C 1 -- sleep 10

 Performance counter stats for 'sleep 10':

 CPU1 &lt;not counted&gt; cycles test #    0.000 GHz
 CPU1 23,933,981,448 cycles      #    0.000 GHz

Now perf stat reports the correct counts for
for the non cgroup event.

If we run pong inside the cgroup, then we also get the
correct counts:

$ perf stat -e cycles,cycles -A -a -G test  -C 1 -- sleep 10

 Performance counter stats for 'sleep 10':

 CPU1 22,297,726,205 cycles test #    0.000 GHz
 CPU1 23,933,981,448 cycles      #    0.000 GHz

      10.001457237 seconds time elapsed

Signed-off-by: Stephane Eranian &lt;eranian@google.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/20110825135803.GA4697@quad
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current cgroup context switch code was incorrect leading
to bogus counts. Furthermore, as soon as there was an active
cgroup event on a CPU, the context switch cost on that CPU
would increase by a significant amount as demonstrated by a
simple ping/pong example:

 $ ./pong
 Both processes pinned to CPU1, running for 10s
 10684.51 ctxsw/s

Now start a cgroup perf stat:
 $ perf stat -e cycles,cycles -A -a -G test  -C 1 -- sleep 100

$ ./pong
 Both processes pinned to CPU1, running for 10s
 6674.61 ctxsw/s

That's a 37% penalty.

Note that pong is not even in the monitored cgroup.

The results shown by perf stat are bogus:
 $ perf stat -e cycles,cycles -A -a -G test  -C 1 -- sleep 100

 Performance counter stats for 'sleep 100':

 CPU1 &lt;not counted&gt; cycles   test
 CPU1 16,984,189,138 cycles  #    0.000 GHz

The second 'cycles' event should report a count @ CPU clock
(here 2.4GHz) as it is counting across all cgroups.

The patch below fixes the bogus accounting and bypasses any
cgroup switches in case the outgoing and incoming tasks are
in the same cgroup.

With this patch the same test now yields:
 $ ./pong
 Both processes pinned to CPU1, running for 10s
 10775.30 ctxsw/s

Start perf stat with cgroup:

 $ perf stat -e cycles,cycles -A -a -G test  -C 1 -- sleep 10

Run pong outside the cgroup:
 $ /pong
 Both processes pinned to CPU1, running for 10s
 10687.80 ctxsw/s

The penalty is now less than 2%.

And the results for perf stat are correct:

$ perf stat -e cycles,cycles -A -a -G test  -C 1 -- sleep 10

 Performance counter stats for 'sleep 10':

 CPU1 &lt;not counted&gt; cycles test #    0.000 GHz
 CPU1 23,933,981,448 cycles      #    0.000 GHz

Now perf stat reports the correct counts for
for the non cgroup event.

If we run pong inside the cgroup, then we also get the
correct counts:

$ perf stat -e cycles,cycles -A -a -G test  -C 1 -- sleep 10

 Performance counter stats for 'sleep 10':

 CPU1 22,297,726,205 cycles test #    0.000 GHz
 CPU1 23,933,981,448 cycles      #    0.000 GHz

      10.001457237 seconds time elapsed

Signed-off-by: Stephane Eranian &lt;eranian@google.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/20110825135803.GA4697@quad
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>All Arch: remove linkage for sys_nfsservctl system call</title>
<updated>2011-08-26T22:09:58+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-08-26T22:03:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f5b940997397229975ea073679b03967932a541b'/>
<id>f5b940997397229975ea073679b03967932a541b</id>
<content type='text'>
The nfsservctl system call is now gone, so we should remove all
linkage for it.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The nfsservctl system call is now gone, so we should remove all
linkage for it.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6</title>
<updated>2011-08-26T20:06:06+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-08-26T20:06:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=efe45ab1ee04551936f8343bd4ca1ff02ffc23bb'/>
<id>efe45ab1ee04551936f8343bd4ca1ff02ffc23bb</id>
<content type='text'>
* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  omap-serial: Allow IXON and IXOFF to be disabled.
  TTY: serial, document ignoring of uart-&gt;ops-&gt;startup error
  TTY: pty, fix pty counting
  8250: Fix race condition in serial8250_backup_timeout().
  serial/8250_pci: delete duplicate data definition
  8250_pci: add support for Rosewill RC-305 4x serial port card
  tty: Add "spi:" prefix for spi modalias
  atmel_serial: fix atmel_default_console_device
  serial: 8250_pnp: add Intermec CV60 touchscreen device
  drivers/serial/ucc_uart.c: Fix compiler warning
  pch_uart: Set PCIe bus number using probe parameter
  serial: samsung: Fix build error
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  omap-serial: Allow IXON and IXOFF to be disabled.
  TTY: serial, document ignoring of uart-&gt;ops-&gt;startup error
  TTY: pty, fix pty counting
  8250: Fix race condition in serial8250_backup_timeout().
  serial/8250_pci: delete duplicate data definition
  8250_pci: add support for Rosewill RC-305 4x serial port card
  tty: Add "spi:" prefix for spi modalias
  atmel_serial: fix atmel_default_console_device
  serial: 8250_pnp: add Intermec CV60 touchscreen device
  drivers/serial/ucc_uart.c: Fix compiler warning
  pch_uart: Set PCIe bus number using probe parameter
  serial: samsung: Fix build error
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6</title>
<updated>2011-08-26T20:05:09+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-08-26T20:05:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3ab47029d91993745212624e49d16a75abc8f207'/>
<id>3ab47029d91993745212624e49d16a75abc8f207</id>
<content type='text'>
* 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  drivers:misc: ti-st: fix unexpected UART close
  drivers:misc: ti-st: free skb on firmware download
  drivers:misc: ti-st: wait for completion at fail
  drivers:misc: ti-st: reinit completion before send
  drivers:misc: ti-st: fail-safe on wrong pkt type
  drivers:misc: ti-st: reinit completion on ver read
  drivers:misc:ti-st: platform hooks for chip states
  drivers:misc: ti-st: avoid a misleading dbg msg
  base/devres.c: quiet sparse noise about context imbalance
  pti: add missing CONFIG_PCI dependency
  drivers/base/devtmpfs.c: correct annotation of `setup_done'
  driver core: fix kernel-doc warning in platform.c
  firmware: fix google/gsmi.c build warning
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  drivers:misc: ti-st: fix unexpected UART close
  drivers:misc: ti-st: free skb on firmware download
  drivers:misc: ti-st: wait for completion at fail
  drivers:misc: ti-st: reinit completion before send
  drivers:misc: ti-st: fail-safe on wrong pkt type
  drivers:misc: ti-st: reinit completion on ver read
  drivers:misc:ti-st: platform hooks for chip states
  drivers:misc: ti-st: avoid a misleading dbg msg
  base/devres.c: quiet sparse noise about context imbalance
  pti: add missing CONFIG_PCI dependency
  drivers/base/devtmpfs.c: correct annotation of `setup_done'
  driver core: fix kernel-doc warning in platform.c
  firmware: fix google/gsmi.c build warning
</pre>
</div>
</content>
</entry>
<entry>
<title>backlight: add a callback 'notify_after' for backlight control</title>
<updated>2011-08-25T23:25:34+00:00</updated>
<author>
<name>Dilan Lee</name>
<email>dilee@nvidia.com</email>
</author>
<published>2011-08-25T22:59:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cc7993f6439b49909a8792660c4d0741fec9d584'/>
<id>cc7993f6439b49909a8792660c4d0741fec9d584</id>
<content type='text'>
We need a callback to do some things after pwm_enable, pwm_disable
and pwm_config.

Signed-off-by: Dilan Lee &lt;dilee@nvidia.com&gt;
Reviewed-by: Robert Morell &lt;rmorell@nvidia.com&gt;
Reviewed-by: Arun Murthy &lt;arun.murthy@stericsson.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need a callback to do some things after pwm_enable, pwm_disable
and pwm_config.

Signed-off-by: Dilan Lee &lt;dilee@nvidia.com&gt;
Reviewed-by: Robert Morell &lt;rmorell@nvidia.com&gt;
Reviewed-by: Arun Murthy &lt;arun.murthy@stericsson.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rapidio: fix use of non-compatible registers</title>
<updated>2011-08-25T23:25:34+00:00</updated>
<author>
<name>Alexandre Bounine</name>
<email>alexandre.bounine@idt.com</email>
</author>
<published>2011-08-25T22:59:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=284fb68d00c56e971ed01e0b4bac5ddd4d1b74ab'/>
<id>284fb68d00c56e971ed01e0b4bac5ddd4d1b74ab</id>
<content type='text'>
Replace/remove use of RIO v.1.2 registers/bits that are not
forward-compatible with newer versions of RapidIO specification.

RapidIO specification v.1.3 removed Write Port CSR, Doorbell CSR,
Mailbox CSR and Mailbox and Doorbell bits of the PEF CAR.

Use of removed (since RIO v.1.3) register bits affects users of
currently available 1.3 and 2.x compliant devices who may use not so
recent kernel versions.

Removing checks for unsupported bits makes corresponding routines
compatible with all versions of RapidIO specification.  Therefore,
backporting makes stable kernel versions compliant with RIO v.1.3 and
later as well.

Signed-off-by: Alexandre Bounine &lt;alexandre.bounine@idt.com&gt;
Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Li Yang &lt;leoli@freescale.com&gt;
Cc: Thomas Moll &lt;thomas.moll@sysgo.com&gt;
Cc: Chul Kim &lt;chul.kim@idt.com&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace/remove use of RIO v.1.2 registers/bits that are not
forward-compatible with newer versions of RapidIO specification.

RapidIO specification v.1.3 removed Write Port CSR, Doorbell CSR,
Mailbox CSR and Mailbox and Doorbell bits of the PEF CAR.

Use of removed (since RIO v.1.3) register bits affects users of
currently available 1.3 and 2.x compliant devices who may use not so
recent kernel versions.

Removing checks for unsupported bits makes corresponding routines
compatible with all versions of RapidIO specification.  Therefore,
backporting makes stable kernel versions compliant with RIO v.1.3 and
later as well.

Signed-off-by: Alexandre Bounine &lt;alexandre.bounine@idt.com&gt;
Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
Cc: Li Yang &lt;leoli@freescale.com&gt;
Cc: Thomas Moll &lt;thomas.moll@sysgo.com&gt;
Cc: Chul Kim &lt;chul.kim@idt.com&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MAINTAINERS: Evgeniy has moved</title>
<updated>2011-08-25T23:25:33+00:00</updated>
<author>
<name>Evgeniy Polyakov</name>
<email>zbr@ioremap.net</email>
</author>
<published>2011-08-25T22:59:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a801876638c5ce650223476c4eb8f37cea32dc1c'/>
<id>a801876638c5ce650223476c4eb8f37cea32dc1c</id>
<content type='text'>
Signed-off-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lockdep: Add helper function for dir vs file i_mutex annotation</title>
<updated>2011-08-25T17:50:18+00:00</updated>
<author>
<name>Josh Boyer</name>
<email>jwboyer@redhat.com</email>
</author>
<published>2011-08-25T11:48:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e096d0c7e2e4e5893792db865dd065ac73cf1f00'/>
<id>e096d0c7e2e4e5893792db865dd065ac73cf1f00</id>
<content type='text'>
Purely in-memory filesystems do not use the inode hash as the dcache
tells us if an entry already exists.  As a result, they do not call
unlock_new_inode, and thus directory inodes do not get put into a
different lockdep class for i_sem.

We need the different lockdep classes, because the locking order for
i_mutex is different for directory inodes and regular inodes.  Directory
inodes can do "readdir()", which takes i_mutex *before* possibly taking
mm-&gt;mmap_sem (due to a page fault while copying the directory entry to
user space).

In contrast, regular inodes can be mmap'ed, which takes mm-&gt;mmap_sem
before accessing i_mutex.

The two cases can never happen for the same inode, so no real deadlock
can occur, but without the different lockdep classes, lockdep cannot
understand that.  As a result, if CONFIG_DEBUG_LOCK_ALLOC is set, this
can lead to false positives from lockdep like below:

    find/645 is trying to acquire lock:
     (&amp;mm-&gt;mmap_sem){++++++}, at: [&lt;ffffffff81109514&gt;] might_fault+0x5c/0xac

    but task is already holding lock:
     (&amp;sb-&gt;s_type-&gt;i_mutex_key#15){+.+.+.}, at: [&lt;ffffffff81149f34&gt;]
    vfs_readdir+0x5b/0xb4

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -&gt; #1 (&amp;sb-&gt;s_type-&gt;i_mutex_key#15){+.+.+.}:
          [&lt;ffffffff8108ac26&gt;] lock_acquire+0xbf/0x103
          [&lt;ffffffff814db822&gt;] __mutex_lock_common+0x4c/0x361
          [&lt;ffffffff814dbc46&gt;] mutex_lock_nested+0x40/0x45
          [&lt;ffffffff811daa87&gt;] hugetlbfs_file_mmap+0x82/0x110
          [&lt;ffffffff81111557&gt;] mmap_region+0x258/0x432
          [&lt;ffffffff811119dd&gt;] do_mmap_pgoff+0x2ac/0x306
          [&lt;ffffffff81111b4f&gt;] sys_mmap_pgoff+0x118/0x16a
          [&lt;ffffffff8100c858&gt;] sys_mmap+0x22/0x24
          [&lt;ffffffff814e3ec2&gt;] system_call_fastpath+0x16/0x1b

    -&gt; #0 (&amp;mm-&gt;mmap_sem){++++++}:
          [&lt;ffffffff8108a4bc&gt;] __lock_acquire+0xa1a/0xcf7
          [&lt;ffffffff8108ac26&gt;] lock_acquire+0xbf/0x103
          [&lt;ffffffff81109541&gt;] might_fault+0x89/0xac
          [&lt;ffffffff81149cff&gt;] filldir+0x6f/0xc7
          [&lt;ffffffff811586ea&gt;] dcache_readdir+0x67/0x205
          [&lt;ffffffff81149f54&gt;] vfs_readdir+0x7b/0xb4
          [&lt;ffffffff8114a073&gt;] sys_getdents+0x7e/0xd1
          [&lt;ffffffff814e3ec2&gt;] system_call_fastpath+0x16/0x1b

This patch moves the directory vs file lockdep annotation into a helper
function that can be called by in-memory filesystems and has hugetlbfs
call it.

Signed-off-by: Josh Boyer &lt;jwboyer@redhat.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purely in-memory filesystems do not use the inode hash as the dcache
tells us if an entry already exists.  As a result, they do not call
unlock_new_inode, and thus directory inodes do not get put into a
different lockdep class for i_sem.

We need the different lockdep classes, because the locking order for
i_mutex is different for directory inodes and regular inodes.  Directory
inodes can do "readdir()", which takes i_mutex *before* possibly taking
mm-&gt;mmap_sem (due to a page fault while copying the directory entry to
user space).

In contrast, regular inodes can be mmap'ed, which takes mm-&gt;mmap_sem
before accessing i_mutex.

The two cases can never happen for the same inode, so no real deadlock
can occur, but without the different lockdep classes, lockdep cannot
understand that.  As a result, if CONFIG_DEBUG_LOCK_ALLOC is set, this
can lead to false positives from lockdep like below:

    find/645 is trying to acquire lock:
     (&amp;mm-&gt;mmap_sem){++++++}, at: [&lt;ffffffff81109514&gt;] might_fault+0x5c/0xac

    but task is already holding lock:
     (&amp;sb-&gt;s_type-&gt;i_mutex_key#15){+.+.+.}, at: [&lt;ffffffff81149f34&gt;]
    vfs_readdir+0x5b/0xb4

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -&gt; #1 (&amp;sb-&gt;s_type-&gt;i_mutex_key#15){+.+.+.}:
          [&lt;ffffffff8108ac26&gt;] lock_acquire+0xbf/0x103
          [&lt;ffffffff814db822&gt;] __mutex_lock_common+0x4c/0x361
          [&lt;ffffffff814dbc46&gt;] mutex_lock_nested+0x40/0x45
          [&lt;ffffffff811daa87&gt;] hugetlbfs_file_mmap+0x82/0x110
          [&lt;ffffffff81111557&gt;] mmap_region+0x258/0x432
          [&lt;ffffffff811119dd&gt;] do_mmap_pgoff+0x2ac/0x306
          [&lt;ffffffff81111b4f&gt;] sys_mmap_pgoff+0x118/0x16a
          [&lt;ffffffff8100c858&gt;] sys_mmap+0x22/0x24
          [&lt;ffffffff814e3ec2&gt;] system_call_fastpath+0x16/0x1b

    -&gt; #0 (&amp;mm-&gt;mmap_sem){++++++}:
          [&lt;ffffffff8108a4bc&gt;] __lock_acquire+0xa1a/0xcf7
          [&lt;ffffffff8108ac26&gt;] lock_acquire+0xbf/0x103
          [&lt;ffffffff81109541&gt;] might_fault+0x89/0xac
          [&lt;ffffffff81149cff&gt;] filldir+0x6f/0xc7
          [&lt;ffffffff811586ea&gt;] dcache_readdir+0x67/0x205
          [&lt;ffffffff81149f54&gt;] vfs_readdir+0x7b/0xb4
          [&lt;ffffffff8114a073&gt;] sys_getdents+0x7e/0xd1
          [&lt;ffffffff814e3ec2&gt;] system_call_fastpath+0x16/0x1b

This patch moves the directory vs file lockdep annotation into a helper
function that can be called by in-memory filesystems and has hugetlbfs
call it.

Signed-off-by: Josh Boyer &lt;jwboyer@redhat.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/writeback</title>
<updated>2011-08-25T17:40:12+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-08-25T17:40:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e33f2d238e2e53e264c758c0849423a9308eb63e'/>
<id>e33f2d238e2e53e264c758c0849423a9308eb63e</id>
<content type='text'>
* 'urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/writeback:
  squeeze max-pause area and drop pass-good area
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/writeback:
  squeeze max-pause area and drop pass-good area
</pre>
</div>
</content>
</entry>
</feed>
