[PATCH 12/14] CacheFiles: Get the SID under which the CacheFiles module should operate [try #2]

2007-08-09 Thread David Howells
Get the SID under which the CacheFiles module should operate so that the SELinux security system can control the accesses it makes. Signed-Off-By: David Howells [EMAIL PROTECTED] --- include/linux/security.h | 20 security/dummy.c |7 +++ security/selinux

[PATCH 09/14] CacheFiles: Permit a process's create SID to be overridden [try #2]

2007-08-09 Thread David Howells
CacheFiles indirectly by means of opening a netfs file at the time the cache file is created. Signed-Off-By: David Howells [EMAIL PROTECTED] --- include/linux/security.h | 35 +++ security/dummy.c | 12 security/selinux/hooks.c | 18

[PATCH 06/14] CacheFiles: Add a hook to write a single page of data to an inode [try #2]

2007-08-09 Thread David Howells
for this that uses the prepare_write() and commit_write() address_space operations to bound a copy directly into the page cache. Hook the Ext2 and Ext3 operations to the generic implementation. Signed-Off-By: David Howells [EMAIL PROTECTED] --- fs/ext2/inode.c|2 + fs/ext3/inode.c|3

[PATCH 10/14] CacheFiles: Add an act-as SID override in task_security_struct [try #2]

2007-08-09 Thread David Howells
. This is useful for CacheFiles in that it allows CacheFiles to access the cache files and directories using the cache's security context rather than the security context of the process on whose behalf it is working, and in the context of which it is running. Signed-Off-By: David Howells [EMAIL PROTECTED

Re: [PATCH 11/14] CacheFiles: Permit an inode's security ID to be obtained [try #2]

2007-08-09 Thread David Howells
Casey Schaufler [EMAIL PROTECTED] wrote: This is SELinux specific functionality. It should not be an LSM interface. This is what I worked out in conjunction with the denizens of the SELinux mailing list. What would you have me do differently? Change things like: u32

Re: [PATCH 09/14] CacheFiles: Permit a process's create SID to be overridden [try #2]

2007-08-09 Thread David Howells
Casey Schaufler [EMAIL PROTECTED] wrote: This is SELinux specific funtionality and should be done in the SELinux code. You should not be adding interfaces that are SELinux specific, in this case using secids instead of the LSM blob interfaces. Is using secids your only objection? Or are you

Re: [PATCH 11/14] CacheFiles: Permit an inode's security ID to be obtained [try #2]

2007-08-09 Thread David Howells
James Morris [EMAIL PROTECTED] wrote: + u32 (*inode_get_secid)(struct inode *inode); To maintain API consistency, please return an int which only acts as an error code, and returning the secid via a *u32 function parameter. Does that apply to *all* the functions, irrespective of whether

Re: [PATCH 14/14] NFS: Use local caching [try #2]

2007-08-09 Thread David Howells
Trond Myklebust [EMAIL PROTECTED] wrote: Dang, that's a lot of inlines... AFAICS, approx half of fs/nfs/fscache.h should really be moved into fscache.c. If you wish. It seems a shame since a lot of them have only one caller. + /* we can do this here as the bits are only set with the page

Re: [PATCH 11/14] CacheFiles: Permit an inode's security ID to be obtained [try #2]

2007-08-09 Thread David Howells
James Morris [EMAIL PROTECTED] wrote: David, I've looked at the code and can't see that you need to access the label itself outside the LSM. Could you instead simply pass the inode pointer around? It's not quite that simple. I need to impose *two* security labels in

Re: [PATCH 14/14] NFS: Use local caching [try #2]

2007-08-09 Thread David Howells
Instead, feel free to update the text-based mount interface (which can be found in 2.6.23-rc1 and later). I presume you're referring to nfs_mount_option_tokens[] and friends. Is there a mount program that can drive this? David - To unsubscribe from this list: send the line unsubscribe

[PATCH 16/16] NFS: Display local caching state [try #3]

2007-08-10 Thread David Howells
Display the local caching state in /proc/fs/nfsfs/volumes. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/nfs/client.c |7 --- fs/nfs/fscache.h | 12 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 0de4db4

[PATCH 14/16] NFS: Use local caching [try #3]

2007-08-10 Thread David Howells
an NFS filesystem to use caching, add an fsc option to the mount: mount warthog:/ /a -o fsc Signed-Off-By: David Howells [EMAIL PROTECTED] --- fs/nfs/Makefile |1 fs/nfs/client.c |5 + fs/nfs/file.c | 51 ++ fs/nfs/fscache-def.c | 288

[PATCH 08/16] CacheFiles: Export things for CacheFiles [try #3]

2007-08-10 Thread David Howells
Export a number of functions for CacheFiles's use. Signed-Off-By: David Howells [EMAIL PROTECTED] --- fs/super.c |2 ++ kernel/auditsc.c |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/fs/super.c b/fs/super.c index fc8ebed..c0d99dd 100644 --- a/fs/super.c

[PATCH 11/16] CacheFiles: Permit an inode's security ID to be obtained [try #3]

2007-08-10 Thread David Howells
Permit an inode's security ID to be obtained by the CacheFiles module. This is then used as the SID with which files and directories will be created in the cache. Signed-Off-By: David Howells [EMAIL PROTECTED] --- include/linux/security.h | 19 +++ security/dummy.c

[PATCH 09/16] CacheFiles: Permit a process's create SID to be overridden [try #3]

2007-08-10 Thread David Howells
CacheFiles indirectly by means of opening a netfs file at the time the cache file is created. Signed-Off-By: David Howells [EMAIL PROTECTED] --- include/linux/security.h | 39 +++ security/dummy.c | 14 ++ security/selinux/hooks.c

[PATCH 03/16] FS-Cache: Provide an add_wait_queue_tail() function [try #3]

2007-08-10 Thread David Howells
Provide an add_wait_queue_tail() function to add a waiter to the back of a wait queue instead of the front. Signed-off-by: David Howells [EMAIL PROTECTED] --- include/linux/wait.h |1 + kernel/wait.c| 18 ++ 2 files changed, 19 insertions(+), 0 deletions(-) diff

[PATCH 07/16] CacheFiles: Permit the page lock state to be monitored [try #3]

2007-08-10 Thread David Howells
-Off-By: David Howells [EMAIL PROTECTED] --- include/linux/pagemap.h |5 + mm/filemap.c| 19 +++ 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index d1049b6..452fdcf 100644 --- a/include/linux

[PATCH 05/16] CacheFiles: Add missing copy_page export for ia64 [try #3]

2007-08-10 Thread David Howells
This one-line patch fixes the missing export of copy_page introduced by the cachefile patches. This patch is not yet upstream, but is required for cachefile on ia64. It will be pushed upstream when cachefile goes upstream. Signed-off-by: Prarit Bhargava [EMAIL PROTECTED] Signed-Off-By: David

[PATCH 02/16] FS-Cache: Recruit a couple of page flags for cache management [try #3]

2007-08-10 Thread David Howells
to detect this. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/splice.c|2 +- include/linux/page-flags.h | 30 +- include/linux/pagemap.h| 11 +++ mm/filemap.c | 16 mm/migrate.c

[PATCH 00/16] Permit filesystem local caching [try #3]

2007-08-10 Thread David Howells
These patches add local caching for network filesystems such as NFS and AFS. FS-Cache now runs fully asynchronously as required by Trond Myklebust for NFS. -- Changes: [try #3]: (*) Added missing file to CacheFiles patch. (*) Made new security functions return errors and pass actual return

[PATCH 15/16] NFS: Configuration and mount option changes to enable local caching on NFS [try #3]

2007-08-10 Thread David Howells
Changes to the kernel configuration defintions and to the NFS mount options to allow the local caching support added by the previous patch to be enabled. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/Kconfig|8 fs/nfs/client.c | 14 ++ fs/nfs

[PATCH 12/16] CacheFiles: Get the SID under which the CacheFiles module should operate [try #3]

2007-08-10 Thread David Howells
Get the SID under which the CacheFiles module should operate so that the SELinux security system can control the accesses it makes. Signed-Off-By: David Howells [EMAIL PROTECTED] --- include/linux/security.h | 20 security/dummy.c |7 +++ security/selinux

[PATCH 01/16] FS-Cache: Release page-private after failed readahead [try #3]

2007-08-10 Thread David Howells
) to do the honours. Signed-Off-By: David Howells [EMAIL PROTECTED] --- mm/readahead.c | 40 ++-- 1 files changed, 38 insertions(+), 2 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index 39bf45d..12d1378 100644 --- a/mm/readahead.c +++ b/mm/readahead.c

Re: [PATCH 14/14] NFS: Use local caching [try #2]

2007-08-10 Thread David Howells
Trond Myklebust [EMAIL PROTECTED] wrote: Dang, that's a lot of inlines... AFAICS, approx half of fs/nfs/fscache.h should really be moved into fscache.c. If you wish. It seems a shame since a lot of them have only one caller. ...however it also forces you to export a lot of stuff

[PATCH 06/16] CacheFiles: Add a hook to write a single page of data to an inode [try #3]

2007-08-10 Thread David Howells
for this that uses the prepare_write() and commit_write() address_space operations to bound a copy directly into the page cache. Hook the Ext2 and Ext3 operations to the generic implementation. Signed-Off-By: David Howells [EMAIL PROTECTED] --- fs/ext2/inode.c|2 + fs/ext3/inode.c|3

Re: [PATCH 11/14] CacheFiles: Permit an inode's security ID to be obtained [try #2]

2007-08-10 Thread David Howells
Casey Schaufler [EMAIL PROTECTED] wrote: Grumble. Yet another thing to undo in the near future. I still hope to suggest what I would consider a viable alternative soon. Use a struct key with the overrides attached? The key can be generated by SELinux or whatever module is there. David - To

Re: [PATCH 6/24] make atomic_read() behave consistently on frv

2007-08-10 Thread David Howells
Chris Snook [EMAIL PROTECTED] wrote: To head off the criticism, I admit this is an oversimplification, and true busy-waiters should be using cpu_relax(), which contains a barrier. Why would you want to use cpu_relax()? That's there to waste time efficiently, isn't it? Shouldn't you be using

[PATCH 10/16] CacheFiles: Add an act-as SID override in task_security_struct [try #3]

2007-08-10 Thread David Howells
. This is useful for CacheFiles in that it allows CacheFiles to access the cache files and directories using the cache's security context rather than the security context of the process on whose behalf it is working, and in the context of which it is running. Signed-Off-By: David Howells [EMAIL PROTECTED

Re: [PATCH 00/16] Permit filesystem local caching [try #3]

2007-08-11 Thread David Howells
Casey Schaufler [EMAIL PROTECTED] wrote: How would you expect an LSM that is not SELinux to interface with CacheFiles? You have to understand that I didn't know that much about the LSM interface, so I asked advice of the Red Hat security people, who, naturally, pointed me at the SELinux

Re: [PATCH 6/24] make atomic_read() behave consistently on frv

2007-08-11 Thread David Howells
Chris Snook [EMAIL PROTECTED] wrote: cpu_relax() contains a barrier, so it should do the right thing. For non-smp architectures, I'm concerned about interacting with interrupt handlers. Some drivers do use atomic_* operations. I'm not sure that actually answers my question. Why not

[PATCH 01/31] Add an ERR_CAST() macro to complement ERR_PTR and co. [try #3]

2007-10-10 Thread David Howells
Add an ERR_CAST() macro to complement ERR_PTR and co. for the purposes of casting an error entyped as one pointer type to an error of another pointer type whilst making it explicit as to what is going on. This provides a replacement for the ERR_PTR(PTR_ERR(p)) construct. Signed-off-by: David

[PATCH 02/31] Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p) [try #3]

2007-10-10 Thread David Howells
Convert instances of ERR_PTR(PTR_ERR(p)) to ERR_CAST(p) using: perl -spi -e 's/ERR_PTR[(]PTR_ERR[(](.*)[)][)]/ERR_CAST(\1)/' `grep -rl 'ERR_PTR[(]*PTR_ERR' fs crypto net security` Signed-off-by: David Howells [EMAIL PROTECTED] --- crypto/cbc.c |2 +- crypto/cryptd.c

[PATCH 03/31] IGET: Introduce a function to register iget failure [try #3]

2007-10-10 Thread David Howells
Introduce a function to register failure in an inode construction path. This includes marking the inode under construction as bad, unlocking it and releasing it. Signed-off-by: David Howells [EMAIL PROTECTED] --- Documentation/filesystems/porting | 18 +- fs/bad_inode.c

[PATCH 04/31] IGET: Use iget_failed() in AFS [try #3]

2007-10-10 Thread David Howells
Use iget_failed() in AFS to kill a failed inode. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/afs/inode.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/fs/afs/inode.c b/fs/afs/inode.c index d196840..ca9b02f 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c

[PATCH 00/31] Remove iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
Hi Christoph, Al, Here's a set of patches that remove all calls to iget() and all read_inode() functions. They should be removed for two reasons: firstly they don't lend themselves to good error handling, and secondly their presence is a temptation for code outside a filesystem to call iget()

[PATCH 05/31] IGET: Use iget_failed() in GFS2 [try #3]

2007-10-10 Thread David Howells
Use iget_failed() in GFS2 to kill a failed inode. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/gfs2/inode.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 34f7bcd..498844f 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2

[PATCH 06/31] IGET: Stop AFFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/affs/affs.h |2 +- fs/affs/amigaffs.c |6 -- fs/affs/inode.c| 20 +--- fs/affs/namei.c| 10 -- fs/affs/super.c| 12

[PATCH 07/31] IGET: Stop autofs from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
Stop the autofs filesystem from using iget() and read_inode(). Replace autofs_read_inode() with autofs_iget(), and call that instead of iget(). autofs_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. Signed-off-by: David

[PATCH 08/31] IGET: Stop BEFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] Acked-by: Will Dyson [EMAIL PROTECTED] --- fs/befs/linuxvfs.c | 39 +-- 1 files changed, 25 insertions(+), 14 deletions(-) diff --git a/fs/befs/linuxvfs.c

[PATCH 09/31] IGET: Stop BFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/bfs/bfs.h |2 ++ fs/bfs/dir.c |6 +++--- fs/bfs/inode.c | 32 ++-- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/fs/bfs/bfs.h b/fs

[PATCH 10/31] IGET: Stop CIFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
error incurred when getting the root inode instead of ENOMEM. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/cifs/cifsfs.c |8 fs/cifs/cifsfs.h |1 + fs/cifs/inode.c | 35 ++- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git

[PATCH 11/31] IGET: Stop EFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
incurred when getting the root inode instead of EACCES. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/efs/inode.c | 25 + fs/efs/namei.c | 23 --- fs/efs/super.c | 18 -- include/linux/efs_fs.h |2

[PATCH 12/31] IGET: Stop EXT2 from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] Acked-by: Theodore Ts'o [EMAIL PROTECTED] --- fs/ext2/ext2.h |2 +- fs/ext2/inode.c | 30 ++ fs/ext2/namei.c | 12 ++-- fs/ext2/super.c | 32

[PATCH 13/31] IGET: Stop EXT3 from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] Acked-by: Theodore Ts'o [EMAIL PROTECTED] Acked-by: Jan Kara [EMAIL PROTECTED] --- fs/ext3/ialloc.c| 58 --- fs/ext3/inode.c | 25

[PATCH 14/31] IGET: Stop EXT4 from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] Acked-by: Theodore Ts'o [EMAIL PROTECTED] Acked-by: Jan Kara [EMAIL PROTECTED] --- fs/ext4/ialloc.c| 58 --- fs/ext4/inode.c | 25

[PATCH 15/31] IGET: Stop FAT from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
Stop the FAT filesystem from using iget() and read_inode(). Replace the call to iget() with a call to ilookup(). Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/fat/inode.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index

[PATCH 16/31] IGET: Stop FreeVXFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
error incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/freevxfs/vxfs_extern.h |2 +- fs/freevxfs/vxfs_inode.c | 45 + fs/freevxfs/vxfs_lookup.c |6 +++--- fs/freevxfs/vxfs_super.c

[PATCH 17/31] IGET: Stop FUSE from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
Stop the FUSE filesystem from using read_inode(), which it doesn't use anyway. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/fuse/inode.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 5448f62..2986654 100644

[PATCH 18/31] IGET: Stop HFSPLUS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
() returns any error incurred when getting the root inode. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/hfsplus/btree.c |6 -- fs/hfsplus/dir.c|6 +++--- fs/hfsplus/hfsplus_fs.h |3 +++ fs/hfsplus/super.c | 44 4

[PATCH 19/31] IGET: Stop ISOFS from using read_inode() [try #3]

2007-10-10 Thread David Howells
Stop the ISOFS filesystem from using read_inode(). Make isofs_read_inode() return an error code, and make isofs_iget() pass it on. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/isofs/inode.c | 25 + 1 files changed, 17 insertions(+), 8 deletions(-) diff --git

[PATCH 20/31] IGET: Stop JFFS2 from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
any error incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/jffs2/dir.c |6 +++-- fs/jffs2/fs.c | 56 --- fs/jffs2/os-linux.h |2 +- fs/jffs2/super.c|1 - 4

[PATCH 21/31] IGET: Stop JFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] Acked-by: Dave Kleikamp [EMAIL PROTECTED] --- fs/jfs/inode.c | 20 fs/jfs/jfs_inode.h |2 +- fs/jfs/namei.c | 34 ++ fs/jfs

[PATCH 22/31] IGET: Stop the MINIX filesystem from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
error incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/minix/inode.c | 43 +-- fs/minix/minix.h |1 + fs/minix/namei.c |7 +++ 3 files changed, 33 insertions(+), 18 deletions

[PATCH 24/31] IGET: Stop QNX4 from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/qnx4/inode.c | 45 ++--- fs/qnx4/namei.c |8 +--- include/linux/qnx4_fs.h |1 + 3 files changed, 36 insertions

[PATCH 23/31] IGET: Stop PROCFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
Stop the PROCFS filesystem from using iget() and read_inode(). Merge procfs_read_inode() into procfs_get_inode(), and have that call iget_locked() instead of iget(). Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/proc/inode.c | 60

[PATCH 26/31] IGET: Stop the SYSV filesystem from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
Stop the SYSV filesystem from using iget() and read_inode(). Replace sysv_read_inode() with sysv_iget(), and call that instead of iget(). sysv_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. Signed-off-by: David Howells [EMAIL

[PATCH 25/31] IGET: Stop ROMFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
error incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/romfs/inode.c | 45 +++-- 1 files changed, 31 insertions(+), 14 deletions(-) diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c index

[PATCH 27/31] IGET: Stop UFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/ufs/inode.c | 34 -- fs/ufs/namei.c |6 +++--- fs/ufs/super.c | 14 +- include/linux/ufs_fs.h |2 +- 4 files

[PATCH 28/31] IGET: Stop OPENPROMFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
. openpromfs_fill_super() returns any error incurred when getting the root inode instead of ENOMEM (not that it currently incurs any other error). Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/openpromfs/inode.c | 45 ++--- 1 files changed, 30 insertions

[PATCH 30/31] IGET: Stop HPPFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
if the inode goes away. (*) hppfs_iget() should perhaps subsume init_inode() and hppfs_read_inode(). (*) It would appear that all hppfs inodes are the same inode because iget() was being called with inode number 0, which forms the lookup key. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs

[PATCH 29/31] IGET: Stop HOSTFS from using iget() and read_inode() [try #3]

2007-10-10 Thread David Howells
with inode number 0 - which forms the lookup key. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/hostfs/hostfs_kern.c | 58 --- 1 files changed, 39 insertions(+), 19 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index

[PATCH 31/31] IGET: Remove iget() and the read_inode() super op as being obsolete [try #3]

2007-10-10 Thread David Howells
)) { ret = PTR_ERR(inode); goto error; } Note that is_bad_inode() does not need to be called. The error returned by thingyfs_iget() should render it unnecessary. Signed-off-by: David Howells [EMAIL PROTECTED] --- Documentation/filesystems/Exporting |5

Re: [PATCH 09/31] IGET: Stop BFS from using iget() and read_inode() [try #3]

2007-10-11 Thread David Howells
Roel Kluin [EMAIL PROTECTED] wrote: + if (IS_ERR(inode)) + return ERR_PTR(-ENOMEM); + if (!(inode-i_state I_NEW)) + return inode; Don't you have to unlock_new_inode(inode) before returning? In the first case, no because an OOM error was returned rather than an

[PATCH 19/31] IGET: Stop ISOFS from using read_inode() [try #4]

2007-10-12 Thread David Howells
Stop the ISOFS filesystem from using read_inode(). Make isofs_read_inode() return an error code, and make isofs_iget() pass it on. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/isofs/inode.c | 25 + 1 files changed, 17 insertions(+), 8 deletions(-) diff --git

[PATCH 18/31] IGET: Stop HFSPLUS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
() returns any error incurred when getting the root inode. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/hfsplus/btree.c |6 -- fs/hfsplus/dir.c|6 +++--- fs/hfsplus/hfsplus_fs.h |3 +++ fs/hfsplus/super.c | 47

[PATCH 14/31] IGET: Stop EXT4 from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] Acked-by: Theodore Ts'o [EMAIL PROTECTED] Acked-by: Jan Kara [EMAIL PROTECTED] --- fs/ext4/ialloc.c| 58 --- fs/ext4/inode.c | 25

[PATCH 12/31] IGET: Stop EXT2 from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] Acked-by: Theodore Ts'o [EMAIL PROTECTED] --- fs/ext2/ext2.h |2 +- fs/ext2/inode.c | 30 ++ fs/ext2/namei.c | 12 ++-- fs/ext2/super.c | 32

[PATCH 11/31] IGET: Stop EFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
incurred when getting the root inode instead of EACCES. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/efs/inode.c | 25 + fs/efs/namei.c | 23 --- fs/efs/super.c | 18 -- include/linux/efs_fs.h |2

[PATCH 10/31] IGET: Stop CIFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
error incurred when getting the root inode instead of ENOMEM. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/cifs/cifsfs.c |8 fs/cifs/cifsfs.h |1 + fs/cifs/inode.c | 35 ++- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git

[PATCH 09/31] IGET: Stop BFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/bfs/bfs.h |2 ++ fs/bfs/dir.c |6 +++--- fs/bfs/inode.c | 32 ++-- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/fs/bfs/bfs.h b/fs

[PATCH 05/31] IGET: Use iget_failed() in GFS2 [try #4]

2007-10-12 Thread David Howells
Use iget_failed() in GFS2 to kill a failed inode. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/gfs2/inode.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 34f7bcd..498844f 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2

[PATCH 04/31] IGET: Use iget_failed() in AFS [try #4]

2007-10-12 Thread David Howells
Use iget_failed() in AFS to kill a failed inode. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/afs/inode.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/fs/afs/inode.c b/fs/afs/inode.c index d196840..ca9b02f 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c

[PATCH 03/31] IGET: Introduce a function to register iget failure [try #4]

2007-10-12 Thread David Howells
Introduce a function to register failure in an inode construction path. This includes marking the inode under construction as bad, unlocking it and releasing it. Signed-off-by: David Howells [EMAIL PROTECTED] --- Documentation/filesystems/porting | 18 +- fs/bad_inode.c

[PATCH 02/31] Convert ERR_PTR(PTR_ERR(p)) instances to ERR_CAST(p) [try #4]

2007-10-12 Thread David Howells
Convert instances of ERR_PTR(PTR_ERR(p)) to ERR_CAST(p) using: perl -spi -e 's/ERR_PTR[(]PTR_ERR[(](.*)[)][)]/ERR_CAST(\1)/' `grep -rl 'ERR_PTR[(]*PTR_ERR' fs crypto net security` Signed-off-by: David Howells [EMAIL PROTECTED] --- crypto/cbc.c |2 +- crypto/cryptd.c

[PATCH 31/31] IGET: Remove iget() and the read_inode() super op as being obsolete [try #4]

2007-10-12 Thread David Howells
)) { ret = PTR_ERR(inode); goto error; } Note that is_bad_inode() does not need to be called. The error returned by thingyfs_iget() should render it unnecessary. Signed-off-by: David Howells [EMAIL PROTECTED] --- Documentation/filesystems/Exporting |5

[PATCH 17/31] IGET: Stop FUSE from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
Stop the FUSE filesystem from using read_inode(), which it doesn't use anyway. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/fuse/inode.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 5448f62..2986654 100644

[PATCH 16/31] IGET: Stop FreeVXFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
error incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/freevxfs/vxfs_extern.h |2 +- fs/freevxfs/vxfs_inode.c | 45 + fs/freevxfs/vxfs_lookup.c |6 +++--- fs/freevxfs/vxfs_super.c

[PATCH 15/31] IGET: Stop FAT from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
Stop the FAT filesystem from using iget() and read_inode(). Replace the call to iget() with a call to ilookup(). Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/fat/inode.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index

[PATCH 08/31] IGET: Stop BEFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] Acked-by: Will Dyson [EMAIL PROTECTED] --- fs/befs/linuxvfs.c | 39 +-- 1 files changed, 25 insertions(+), 14 deletions(-) diff --git a/fs/befs/linuxvfs.c

[PATCH 06/31] IGET: Stop AFFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/affs/affs.h |2 +- fs/affs/amigaffs.c |6 -- fs/affs/inode.c| 20 +--- fs/affs/namei.c| 10 -- fs/affs/super.c| 12

[PATCH 23/31] IGET: Stop PROCFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
Stop the PROCFS filesystem from using iget() and read_inode(). Merge procfs_read_inode() into procfs_get_inode(), and have that call iget_locked() instead of iget(). Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/proc/inode.c | 60

[PATCH 25/31] IGET: Stop ROMFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
error incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/romfs/inode.c | 45 +++-- 1 files changed, 31 insertions(+), 14 deletions(-) diff --git a/fs/romfs/inode.c b/fs/romfs/inode.c index

[PATCH 26/31] IGET: Stop the SYSV filesystem from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
Stop the SYSV filesystem from using iget() and read_inode(). Replace sysv_read_inode() with sysv_iget(), and call that instead of iget(). sysv_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. Signed-off-by: David Howells [EMAIL

[PATCH 28/31] IGET: Stop OPENPROMFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
. openpromfs_fill_super() returns any error incurred when getting the root inode instead of ENOMEM (not that it currently incurs any other error). Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/openpromfs/inode.c | 45 ++--- 1 files changed, 30 insertions

[PATCH 00/31] Remove iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
Hi Linus, Here's a set of patches that remove all calls to iget() and all read_inode() functions. They should be removed for two reasons: firstly they don't lend themselves to good error handling, and secondly their presence is a temptation for code outside a filesystem to call iget() to

[PATCH 30/31] IGET: Stop HPPFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
if the inode goes away. (*) hppfs_iget() should perhaps subsume init_inode() and hppfs_read_inode(). (*) It would appear that all hppfs inodes are the same inode because iget() was being called with inode number 0, which forms the lookup key. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs

[PATCH 29/31] IGET: Stop HOSTFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
with inode number 0 - which forms the lookup key. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/hostfs/hostfs_kern.c | 58 --- 1 files changed, 39 insertions(+), 19 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index

[PATCH 27/31] IGET: Stop UFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/ufs/inode.c | 34 -- fs/ufs/namei.c |6 +++--- fs/ufs/super.c | 14 +- include/linux/ufs_fs.h |2 +- 4 files

[PATCH 24/31] IGET: Stop QNX4 from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/qnx4/inode.c | 45 ++--- fs/qnx4/namei.c |8 +--- include/linux/qnx4_fs.h |1 + 3 files changed, 36 insertions

[PATCH 01/31] Add an ERR_CAST() macro to complement ERR_PTR and co. [try #4]

2007-10-12 Thread David Howells
Add an ERR_CAST() macro to complement ERR_PTR and co. for the purposes of casting an error entyped as one pointer type to an error of another pointer type whilst making it explicit as to what is going on. This provides a replacement for the ERR_PTR(PTR_ERR(p)) construct. Signed-off-by: David

[PATCH 22/31] IGET: Stop the MINIX filesystem from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
error incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/minix/inode.c | 43 +-- fs/minix/minix.h |1 + fs/minix/namei.c |7 +++ 3 files changed, 33 insertions(+), 18 deletions

[PATCH 21/31] IGET: Stop JFS from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] Acked-by: Dave Kleikamp [EMAIL PROTECTED] --- fs/jfs/inode.c | 20 fs/jfs/jfs_inode.h |2 +- fs/jfs/namei.c | 34 ++ fs/jfs

[PATCH 07/31] IGET: Stop autofs from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
Stop the autofs filesystem from using iget() and read_inode(). Replace autofs_read_inode() with autofs_iget(), and call that instead of iget(). autofs_iget() then uses iget_locked() directly and returns a proper error code instead of an inode in the event of an error. Signed-off-by: David

[PATCH 13/31] IGET: Stop EXT3 from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] Acked-by: Theodore Ts'o [EMAIL PROTECTED] Acked-by: Jan Kara [EMAIL PROTECTED] --- fs/ext3/ialloc.c| 58 --- fs/ext3/inode.c | 25

[PATCH 20/31] IGET: Stop JFFS2 from using iget() and read_inode() [try #4]

2007-10-12 Thread David Howells
any error incurred when getting the root inode instead of EINVAL. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/jffs2/dir.c |6 +++-- fs/jffs2/fs.c | 56 --- fs/jffs2/os-linux.h |2 +- fs/jffs2/super.c|1 - 4

[PATCH 51/52] CRED: Pass credentials through the removexattr() inode op

2007-10-12 Thread David Howells
Pass credentials through the removexattr() inode operation. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/bad_inode.c |3 ++- fs/nfs/nfs3acl.c |4 ++-- fs/xattr.c |7 --- include/linux/fs.h |2 +- include/linux/nfs_fs.h |2

[PATCH 50/52] CRED: Pass credentials through the listxattr() inode op

2007-10-12 Thread David Howells
Pass credentials through the listxattr() inode operation. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/bad_inode.c |2 +- fs/ext3/xattr.c|4 ++-- fs/ext3/xattr.h|2 +- fs/nfs/nfs3acl.c |4 ++-- fs/nfs/nfs4_fs.h |2 +- fs/nfs

[PATCH 46/52] CRED: Pass credentials through the setxattr() inode op

2007-10-12 Thread David Howells
Pass credentials through the setxattr() inode operation. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/bad_inode.c |2 +- fs/nfs/nfs3acl.c |3 +-- fs/nfs/nfs4_fs.h |3 ++- fs/nfs/nfs4proc.c |3 +-- fs/xattr.c |8 +--- include

[PATCH 43/52] CRED: Pass credentials through the statfs() superblock op

2007-10-12 Thread David Howells
Pass credentials through the statfs() superblock operation. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/afs/super.c |6 -- fs/ext3/super.c|6 -- fs/fat/inode.c |3 ++- fs/libfs.c |2 +- fs/nfs/super.c |6 +++--- fs/open.c

[PATCH 40/52] CRED: Give the lookup() inode op a credentials pointer

2007-10-12 Thread David Howells
Give the lookup() inode op a credentials pointer. Signed-off-by: David Howells [EMAIL PROTECTED] --- fs/afs/dir.c|4 ++-- fs/afs/mntpt.c |6 -- fs/autofs4/root.c |6 -- fs/bad_inode.c |3 ++- fs/ext3/namei.c |4 ++-- fs

<    5   6   7   8   9   10   11   12   13   14   >