All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] VFS: File pinning: pre-script-run fixups
@ 2015-03-25 14:43 David Howells
  2015-03-25 14:43 ` [PATCH 01/15] configfs: Fix inconsistent use of file_inode() vs file->f_path.dentry->d_inode David Howells
                   ` (14 more replies)
  0 siblings, 15 replies; 19+ messages in thread
From: David Howells @ 2015-03-25 14:43 UTC (permalink / raw)
  To: viro; +Cc: dhowells, linux-unionfs, linux-kernel, miklos


Hi Al,

Could you have a look over these patches please?  They can be divided into a
number of subsets:

 (1) A fix for configfs to be consistent about the use of file_inode() vs
     dentry->d_inode within a function.

 (2) Fix various accesses to dentry->d_inode to use d_inode(dentry) where there
     are brackets and things that cause the RE to not match in the scripted
     mass changes.

 (3) Similar to (2), but instances of dentry->d_inode should be changed to
     d_backing_inode(dentry) instead where the code is dealing with someone
     else's dentries and inodes.

 (4) Fix up the chelsio driver to use file_inode() rather than its own wrapper.

 (5) Use d_is_dir() instead of S_ISDIR() where we can.

 (6) Fix up NFS to not use d_inode as a variable name.


 (7) Supply d_really_is_positive/negative() to ignore the dentry type field
     (unlike d_is_positive/negative()) for use in filesystems and pretty much
     anywhere you'd use d_inode() rather than d_backing_inode().

Then there's the last three patches which form a subset.

 (8) Impose a partial ordering on reads and writes of ->d_inode and the type
     field in ->d_flags.  Always set the inode pointer *before* the type and
     always read the type *before* the inode pointer.  This should allow us to
     collapse:

	if (!dentry->d_inode || d_is_negative(dentry)) {
    
     down to:
    
    	if (d_is_negative(dentry)) {

     during RCU pathwalk.  I think.

 (9) Make pathwalk use d_is_reg() rather than S_ISREG() so that we don't need
     the inode pointer there.

Ideally, I'd like to kill struct nameidata::inode, but I think we can only do
that if we do proper unconditional COW and discard on directory dentries when
killing them rather than recycling them.  I think the only actual RCU-mode user
of nd->inode remaining is inode_permission().


The patches can also be found here:

	http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=file-pin-devel

The scripted changed to d_inode() can be found here:

	http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=file-pin-fs-experimental

And the scripted changed to d_backing_inode() can be found here:

	http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=file-pin-nonfs-experimental

David
---
David Howells (15):
      configfs: Fix inconsistent use of file_inode() vs file->f_path.dentry->d_inode
      VFS: Fix up missed bits of apparmor to use d_inode()
      VFS: Fix up audit to use d_backing_inode()
      VFS: Fix up missed bits of lustre to use d_inode()
      VFS: Fix up missed bits of ecryptfs to use d_inode()
      VFS: Fix up missed bits of reiserfs to use d_inode()
      VFS: AF_UNIX sockets should call mknod on the top layer only
      VFS: Cachefiles should perform fs modifications on the top layer only
      VFS: Fix up some ->d_inode accesses in the chelsio driver
      VFS: Fix up debugfs to use d_is_dir() in place of S_ISDIR()
      NFS: Don't use d_inode as a variable name
      VFS: Add owner-filesystem positive/negative dentry checks
      VFS: Impose ordering on accesses of d_inode and d_flags
      VFS: Combine inode checks with d_is_negative() and d_is_positive() in pathwalk
      VFS: Make pathwalk use d_is_reg() rather than S_ISREG()


 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c |   21 ++-----
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.h |    2 -
 drivers/staging/lustre/lustre/llite/namei.c        |    2 -
 drivers/staging/lustre/lustre/llite/statahead.c    |    8 +--
 fs/cachefiles/interface.c                          |    4 +
 fs/cachefiles/namei.c                              |   52 +++++++++---------
 fs/configfs/dir.c                                  |    2 -
 fs/dcache.c                                        |   47 +++++++++++++---
 fs/debugfs/inode.c                                 |    2 -
 fs/ecryptfs/inode.c                                |    4 +
 fs/namei.c                                         |    8 +--
 fs/nfs/read.c                                      |    8 +--
 fs/reiserfs/xattr.h                                |    2 -
 include/linux/dcache.h                             |   59 ++++++++++++++------
 kernel/audit_watch.c                               |    2 -
 net/unix/af_unix.c                                 |    2 -
 security/apparmor/apparmorfs.c                     |    2 -
 17 files changed, 136 insertions(+), 91 deletions(-)


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-03-27 15:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-25 14:43 [PATCH 00/15] VFS: File pinning: pre-script-run fixups David Howells
2015-03-25 14:43 ` [PATCH 01/15] configfs: Fix inconsistent use of file_inode() vs file->f_path.dentry->d_inode David Howells
2015-03-25 14:43 ` [PATCH 02/15] VFS: Fix up missed bits of apparmor to use d_inode() David Howells
2015-03-25 14:43 ` [PATCH 03/15] VFS: Fix up audit to use d_backing_inode() David Howells
2015-03-25 14:44 ` [PATCH 04/15] VFS: Fix up missed bits of lustre to use d_inode() David Howells
2015-03-25 14:44 ` [PATCH 05/15] VFS: Fix up missed bits of ecryptfs " David Howells
2015-03-25 14:44 ` [PATCH 06/15] VFS: Fix up missed bits of reiserfs " David Howells
2015-03-25 14:44 ` [PATCH 07/15] VFS: AF_UNIX sockets should call mknod on the top layer only David Howells
2015-03-25 14:44 ` [PATCH 08/15] VFS: Cachefiles should perform fs modifications " David Howells
2015-03-25 14:44 ` [PATCH 09/15] VFS: Fix up some ->d_inode accesses in the chelsio driver David Howells
2015-03-25 14:45 ` [PATCH 10/15] VFS: Fix up debugfs to use d_is_dir() in place of S_ISDIR() David Howells
2015-03-25 14:45 ` [PATCH 11/15] NFS: Don't use d_inode as a variable name David Howells
2015-03-25 14:45 ` [PATCH 12/15] VFS: Add owner-filesystem positive/negative dentry checks David Howells
2015-03-26 13:05   ` Miklos Szeredi
2015-03-27 14:42   ` David Howells
2015-03-27 15:27     ` Miklos Szeredi
2015-03-25 14:45 ` [PATCH 13/15] VFS: Impose ordering on accesses of d_inode and d_flags David Howells
2015-03-25 14:45 ` [PATCH 14/15] VFS: Combine inode checks with d_is_negative() and d_is_positive() in pathwalk David Howells
2015-03-25 14:45 ` [PATCH 15/15] VFS: Make pathwalk use d_is_reg() rather than S_ISREG() David Howells

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.