History log of /fs/sysv/namei.c
Revision Date Author Comments
da53be12bbb4fabbe2e9f6f908de0cf478b5161d 22-May-2013 Linus Torvalds <torvalds@linux-foundation.org> Don't pass inode to ->d_hash() and ->d_compare()

Instances either don't look at it at all (the majority of cases) or
only want it to find the superblock (which can be had as dentry->d_sb).
A few cases that want more are actually safe with dentry->d_inode -
the only precaution needed is the check that it hadn't been replaced with
NULL by rmdir() or by overwriting rename(), which case should be simply
treated as cache miss.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
ebfc3b49a7ac25920cb5be5445f602e51d2ea559 11-Jun-2012 Al Viro <viro@zeniv.linux.org.uk> don't pass nameidata to ->create()

boolean "does it have to be exclusive?" flag is passed instead;
Local filesystem should just ignore it - the object is guaranteed
not to be there yet.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
00cd8dd3bf95f2cc8435b4cac01d9995635c6d0b 10-Jun-2012 Al Viro <viro@zeniv.linux.org.uk> stop passing nameidata to ->lookup()

Just the flags; only NFS cares even about that, but there are
legitimate uses for such argument. And getting rid of that
completely would require splitting ->lookup() into a couple
of methods (at least), so let's leave that alone for now...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
8de52778798fe39660a8d6b26f290e0c93202761 06-Feb-2012 Al Viro <viro@zeniv.linux.org.uk> vfs: check i_nlink limits in vfs_{mkdir,rename_dir,link}

New field of struct super_block - ->s_max_links. Maximal allowed
value of ->i_nlink or 0; in the latter case all checks still need
to be done in ->link/->mkdir/->rename instances. Note that this
limit applies both to directoris and to non-directories.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1a67aafb5f72a436ca044293309fa7e6351d6a35 26-Jul-2011 Al Viro <viro@zeniv.linux.org.uk> switch ->mknod() to umode_t

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
4acdaf27ebe2034c342f3be57ef49aed1ad885ef 26-Jul-2011 Al Viro <viro@zeniv.linux.org.uk> switch ->create() to umode_t

vfs_create() ignores everything outside of 16bit subset of its
mode argument; switching it to umode_t is obviously equivalent
and it's the only caller of the method

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
18bb1db3e7607e4a997d50991a6f9fa5b0f8722c 26-Jul-2011 Al Viro <viro@zeniv.linux.org.uk> switch vfs_mkdir() and ->mkdir() to umode_t

vfs_mkdir() gets int, but immediately drops everything that might not
fit into umode_t and that's the only caller of ->mkdir()...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
873ae4d5a8b282c6e2bbc09c6d59eeb1bec97ef7 27-May-2011 Sage Weil <sage@newdream.net> sysv: remove unnecessary dentry_unhash from rmdir, dir rename

sysv does not have problems with references to unlinked directories.

CC: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
e4eaac06bcccb2a70bca6a2de9871882dce2aa14 24-May-2011 Sage Weil <sage@newdream.net> vfs: push dentry_unhash on rename_dir into file systems

Only a few file systems need this. Start by pushing it down into each
rename method (except gfs2 and xfs) so that it can be dealt with on a
per-fs basis.

Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
79bf7c732b5ff75b96022ed9d29181afd3d2509c 24-May-2011 Sage Weil <sage@newdream.net> vfs: push dentry_unhash on rmdir into file systems

Only a few file systems need this. Start by pushing it down into each
fs rmdir method (except gfs2 and xfs) so it can be dealt with on a per-fs
basis.

This does not change behavior for any in-tree file systems.

Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
4787d45fa76b97e224a8299086bb5fb496275796 02-Mar-2011 Al Viro <viro@zeniv.linux.org.uk> sysv: i_nlink races in rename()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
30304aba6a053f114092cea6643a96ac2902bc5a 18-Dec-2010 Al Viro <viro@zeniv.linux.org.uk> switch sysv

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fb045adb99d9b7c562dc7fef834857f78249daa1 07-Jan-2011 Nick Piggin <npiggin@kernel.dk> fs: dcache reduce branches in lookup path

Reduce some branches and memory accesses in dcache lookup by adding dentry
flags to indicate common d_ops are set, rather than having to check them.
This saves a pointer memory access (dentry->d_op) in common path lookup
situations, and saves another pointer load and branch in cases where we
have d_op but not the particular operation.

Patched with:

git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
b1e6a015a580ad145689ad1d6b4aa0e03e6c868b 07-Jan-2011 Nick Piggin <npiggin@kernel.dk> fs: change d_hash for rcu-walk

Change d_hash so it may be called from lock-free RCU lookups. See similar
patch for d_compare for details.

For in-tree filesystems, this is just a mechanical change.

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
7de9c6ee3ecffd99e1628e81a5ea5468f7581a1f 23-Oct-2010 Al Viro <viro@zeniv.linux.org.uk> new helper: ihold()

Clones an existing reference to inode; caller must already hold one.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
e16404ed0f3f330dc3e99b95cef69bb60bcd27f7 20-Feb-2009 Al Viro <viro@zeniv.linux.org.uk> constify dentry_operations: misc filesystems

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
b8e1343f67460554ca5321956c440cc064e9889b 07-Feb-2008 David Howells <dhowells@redhat.com> iget: stop the SYSV filesystem from using iget() and read_inode()

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.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
e63340ae6b6205fef26b40a75673d1c9c0c8bb90 08-May-2007 Randy Dunlap <randy.dunlap@oracle.com> header cleaning: don't include smp_lock.h when not used

Remove includes of <linux/smp_lock.h> where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
c5ef1c42c51b1b5b4a401a6517bdda30933ddbaf 12-Feb-2007 Arjan van de Ven <arjan@linux.intel.com> [PATCH] mark struct inode_operations const 3

Many struct inode_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9a53c3a783c2fa9b969628e65695c11c3e51e673 01-Oct-2006 Dave Hansen <haveblue@us.ibm.com> [PATCH] r/o bind mounts: unlink: monitor i_nlink

When a filesystem decrements i_nlink to zero, it means that a write must be
performed in order to drop the inode from the filesystem.

We're shortly going to have keep filesystems from being remounted r/o between
the time that this i_nlink decrement and that write occurs.

So, add a little helper function to do the decrements. We'll tie into it in a
bit to note when i_nlink hits zero.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
4e907c3d45d10dc5162d283d109be425c23aeb69 23-Mar-2006 Alexey Dobriyan <adobriyan@gmail.com> [PATCH] sysv: switch to inode_inc_count, inode_dec_count

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!