15 Apr, 2009

3 commits

  • There are lots of sequences like this, especially in splice code:

    if (pipe->inode)
    mutex_lock(&pipe->inode->i_mutex);
    /* do something */
    if (pipe->inode)
    mutex_unlock(&pipe->inode->i_mutex);

    so introduce helpers which do the conditional locking and unlocking.
    Also replace the inode_double_lock() call with a pipe_double_lock()
    helper to avoid spreading the use of this functionality beyond the
    pipe code.

    This patch is just a cleanup, and should cause no behavioral changes.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Jens Axboe

    Miklos Szeredi
     
  • Remove the now unused generic_file_splice_write_nolock() function.
    It's conceptually broken anyway, because splice may need to wait for
    pipe events so holding locks across the whole operation is wrong.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Jens Axboe

    Miklos Szeredi
     
  • It's a somewhat twisty maze of hints and behavioural modifiers, try
    and clear it up a bit with some documentation.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

07 Apr, 2009

2 commits

  • The mqueuefs filesystem will use this helper as well. Proc's main get_sb
    could also be made to use it, but that will require a bit more rework.

    Signed-off-by: Serge E. Hallyn
    Cc: Cedric Le Goater
    Cc: Alexey Dobriyan
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • …git/tip/linux-2.6-tip

    * 'kmemtrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    kmemtrace: trace kfree() calls with NULL or zero-length objects
    kmemtrace: small cleanups
    kmemtrace: restore original tracing data binary format, improve ABI
    kmemtrace: kmemtrace_alloc() must fill type_id
    kmemtrace: use tracepoints
    kmemtrace, rcu: don't include unnecessary headers, allow kmemtrace w/ tracepoints
    kmemtrace, rcu: fix rcupreempt.c data structure dependencies
    kmemtrace, rcu: fix rcu_tree_trace.c data structure dependencies
    kmemtrace, rcu: fix linux/rcutree.h and linux/rcuclassic.h dependencies
    kmemtrace, mm: fix slab.h dependency problem in mm/failslab.c
    kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_unlzma.c
    kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_bunzip2.c
    kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_inflate.c
    kmemtrace, squashfs: fix slab.h dependency problem in squasfs
    kmemtrace, befs: fix slab.h dependency problem
    kmemtrace, security: fix linux/key.h header file dependencies
    kmemtrace, fs: fix linux/fdtable.h header file dependencies
    kmemtrace, fs: uninline simple_transaction_set()
    kmemtrace, fs, security: move alloc_secdata() and free_secdata() to linux/security.h

    Linus Torvalds
     

06 Apr, 2009

2 commits

  • By default, CFQ will anticipate more IO from a given io context if the
    previously completed IO was sync. This used to be fine, since the only
    sync IO was reads and O_DIRECT writes. But with more "normal" sync writes
    being used now, we don't want to anticipate for those.

    Add a bio/request flag that informs the IO scheduler that this is a sync
    request that we should not idle for. Introduce WRITE_ODIRECT specifically
    for O_DIRECT writes, and make sure that the other sync writes set this
    flag.

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     
  • (S)WRITE_SYNC always unplugs the device right after IO submission.
    Sometimes we want to build up a queue before doing so, so add
    variants that explicitly DON'T unplug the queue. The caller must
    then do that after submitting all the IO.

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     

03 Apr, 2009

3 commits

  • Impact: cleanup

    We want to remove percpu.h from rcupdate.h (for upcoming kmemtrace
    changes), but this is not possible currently without breaking the
    build because fs.h has an implicit include file depedency: it
    uses PAGE_SIZE but does not include asm/page.h which defines it.

    This problem gets masked in practice because most fs.h using sites
    use rcupreempt.h (and other headers) which includes percpu.h which
    brings in asm/page.h indirectly.

    We cannot add asm/page.h to asm/fs.h because page.h is not an
    exported header.

    Move simple_transaction_set() to the other simple-transaction
    file helpers in fs/libfs.c.

    This removes the include file hell and also reduces
    kernel size a bit.

    Acked-by: Al Viro
    Cc: Alexey Dobriyan
    Cc: Pekka Enberg
    Cc: Eduard - Gabriel Munteanu
    Cc: paulmck@linux.vnet.ibm.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Impact: cleanup

    We want to remove percpu.h from rcupdate.h (for upcoming kmemtrace
    changes), but this is not possible currently without breaking the
    build because fs.h has implicit include file depedencies: it uses
    GFP_* types in inlines but does not include gfp.h.

    In practice most fs.h using .c files get gfp.h included implicitly,
    via an indirect route: via rcupdate.h inclusion - so this underlying
    problem gets masked in practice.

    So we want to solve fs.h's dependency on gfp.h.

    gfp.h can not be included here directly because it is not exported and it
    would break the build the following way:

    /home/mingo/tip/usr/include/linux/bsg.h:11: found __[us]{8,16,32,64} type without #include
    /home/mingo/tip/usr/include/linux/fs.h:11: included file 'linux/gfp.h' is not exported
    make[3]: *** [/home/mingo/tip/usr/include/linux/.check] Error 1
    make[2]: *** [linux] Error 2

    As suggested by Alexey Dobriyan, move alloc_secdata() and free_secdata()
    to linux/security.h - they belong there. This also cleans fs.h of GFP_*
    usage.

    Suggested-by: Alexey Dobriyan
    Signed-off-by: Pekka Enberg
    Cc: Eduard - Gabriel Munteanu
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Pekka Enberg
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    Remove two unneeded exports and make two symbols static in fs/mpage.c
    Cleanup after commit 585d3bc06f4ca57f975a5a1f698f65a45ea66225
    Trim includes of fdtable.h
    Don't crap into descriptor table in binfmt_som
    Trim includes in binfmt_elf
    Don't mess with descriptor table in load_elf_binary()
    Get rid of indirect include of fs_struct.h
    New helper - current_umask()
    check_unsafe_exec() doesn't care about signal handlers sharing
    New locking/refcounting for fs_struct
    Take fs_struct handling to new file (fs/fs_struct.c)
    Get rid of bumping fs_struct refcount in pivot_root(2)
    Kill unsharing fs_struct in __set_personality()

    Linus Torvalds
     

01 Apr, 2009

3 commits

  • Now that the filesystem freeze operation has been elevated to the VFS, and
    is just an ioctl away, some sort of safety net for unintentionally frozen
    root filesystems may be in order.

    The timeout thaw originally proposed did not get merged, but perhaps
    something like this would be useful in emergencies.

    For example, freeze /path/to/mountpoint may freeze your root filesystem if
    you forgot that you had that unmounted.

    I chose 'j' as the last remaining character other than 'h' which is sort
    of reserved for help (because help is generated on any unknown character).

    I've tested this on a non-root fs with multiple (nested) freezers, as well
    as on a system rendered unresponsive due to a frozen root fs.

    [randy.dunlap@oracle.com: emergency thaw only if CONFIG_BLOCK enabled]
    Signed-off-by: Eric Sandeen
    Cc: Takashi Sato
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     
  • fsync_bdev() export and a bunch of stubs for !CONFIG_BLOCK case had
    been left behind

    Signed-off-by: Al Viro

    Al Viro
     
  • current->fs->umask is what most of fs_struct users are doing.
    Put that into a helper function.

    Signed-off-by: Al Viro

    Al Viro
     

31 Mar, 2009

1 commit


30 Mar, 2009

1 commit

  • Lockdep gripes if file->f_lock is taken in a no-IRQ situation, since that
    is not always the case. We don't really want to disable IRQs for every
    acquisition of f_lock; instead, just move it outside of fasync_lock.

    Reported-by: Bartlomiej Zolnierkiewicz
    Reported-by: Larry Finger
    Reported-by: Wu Fengguang
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

28 Mar, 2009

6 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (37 commits)
    fs: avoid I_NEW inodes
    Merge code for single and multiple-instance mounts
    Remove get_init_pts_sb()
    Move common mknod_ptmx() calls into caller
    Parse mount options just once and copy them to super block
    Unroll essentials of do_remount_sb() into devpts
    vfs: simple_set_mnt() should return void
    fs: move bdev code out of buffer.c
    constify dentry_operations: rest
    constify dentry_operations: configfs
    constify dentry_operations: sysfs
    constify dentry_operations: JFS
    constify dentry_operations: OCFS2
    constify dentry_operations: GFS2
    constify dentry_operations: FAT
    constify dentry_operations: FUSE
    constify dentry_operations: procfs
    constify dentry_operations: ecryptfs
    constify dentry_operations: CIFS
    constify dentry_operations: AFS
    ...

    Linus Torvalds
     
  • simple_set_mnt() is defined as returning 'int' but always returns 0.
    Callers assume simple_set_mnt() never fails and don't properly cleanup if
    it were to _ever_ fail. For instance, get_sb_single() and get_sb_nodev()
    should:

    up_write(sb->s_unmount);
    deactivate_super(sb);

    if simple_set_mnt() fails.

    Since simple_set_mnt() never fails, would be cleaner if it did not
    return anything.

    [akpm@linux-foundation.org: fix build]
    Signed-off-by: Sukadev Bhattiprolu
    Acked-by: Serge Hallyn
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Sukadev Bhattiprolu
     
  • Move some block device related code out from buffer.c and put it in
    block_dev.c. I'm trying to move non-buffer_head code out of buffer.c

    Signed-off-by: Al Viro

    Nick Piggin
     
  • There is a second set of macros for when CONFIG_FILE_LOCKING is
    not set. This patch updates those to become inline functions
    as well.

    Signed-off-by: Steven Whitehouse
    Signed-off-by: Al Viro

    Steven Whitehouse
     
  • This avoids various issues which might give rise to compiler warnings
    about missing functions and/or unused variable with the previous
    macros. This also fixes a bug where one of the macros was returning
    0, but it should have been void.

    Reported-by: Randy Dunlap
    Signed-off-by: Steven Whitehouse
    Tested-by: Randy Dunlap
    Signed-off-by: Al Viro

    Steven Whitehouse
     
  • The last user of do_pipe is in arch/alpha/, after replacing it with
    do_pipe_flags, the do_pipe can be totally dropped.

    Signed-off-by: Cheng Renquan
    Acked-by: Richard Henderson
    Signed-off-by: Al Viro

    Cheng Renquan
     

27 Mar, 2009

2 commits


16 Mar, 2009

2 commits

  • Traditionally, changes to struct file->f_flags have been done under BKL
    protection, or with no protection at all. This patch causes all f_flags
    changes after file open/creation time to be done under protection of
    f_lock. This allows the removal of some BKL usage and fixes a number of
    longstanding (if microscopic) races.

    Reviewed-by: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     
  • This lock moves out of the CONFIG_EPOLL ifdef and becomes f_lock. For now,
    epoll remains the only user, but a future patch will use it to protect
    f_flags as well.

    Cc: Davide Libenzi
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

19 Feb, 2009

2 commits

  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    block: fix deadlock in blk_abort_queue() for drivers that readd to timeout list
    block: fix booting from partitioned md array
    block: revert part of 18ce3751ccd488c78d3827e9f6bf54e6322676fb
    cciss: PCI power management reset for kexec
    paride/pg.c: xs(): &&/|| confusion
    fs/bio: bio_alloc_bioset: pass right object ptr to mempool_free
    block: fix bad definition of BIO_RW_SYNC
    bsg: Fix sense buffer bug in SG_IO

    Linus Torvalds
     
  • Separate FMODE_PREAD and FMODE_PWRITE into separate flags to reflect the
    reality that the read and write paths may have independent restrictions.

    A git grep verifies that these flags are always cleared together so this
    new behavior will only apply to interfaces that change to clear flags
    individually.

    This is required for "seq_file: properly cope with pread", a post-2.6.25
    regression fix.

    [akpm@linux-foundation.org: add comment]
    Signed-off-by: Paul Turner
    Cc: Eric Biederman
    Cc: Alexey Dobriyan
    Cc: Al Viro
    Cc: [2.6.25.x, 2.6.26.x, 2.6.27.x, 2.6.28.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Turner
     

18 Feb, 2009

1 commit


10 Jan, 2009

2 commits

  • The ioctls for the generic freeze feature are below.
    o Freeze the filesystem
    int ioctl(int fd, int FIFREEZE, arg)
    fd: The file descriptor of the mountpoint
    FIFREEZE: request code for the freeze
    arg: Ignored
    Return value: 0 if the operation succeeds. Otherwise, -1

    o Unfreeze the filesystem
    int ioctl(int fd, int FITHAW, arg)
    fd: The file descriptor of the mountpoint
    FITHAW: request code for unfreeze
    arg: Ignored
    Return value: 0 if the operation succeeds. Otherwise, -1
    Error number: If the filesystem has already been unfrozen,
    errno is set to EINVAL.

    [akpm@linux-foundation.org: fix CONFIG_BLOCK=n]
    Signed-off-by: Takashi Sato
    Signed-off-by: Masayuki Hamaguchi
    Cc:
    Cc:
    Cc: Christoph Hellwig
    Cc: Dave Kleikamp
    Cc: Dave Chinner
    Cc: Alasdair G Kergon
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Takashi Sato
     
  • Currently, ext3 in mainline Linux doesn't have the freeze feature which
    suspends write requests. So, we cannot take a backup which keeps the
    filesystem's consistency with the storage device's features (snapshot and
    replication) while it is mounted.

    In many case, a commercial filesystem (e.g. VxFS) has the freeze feature
    and it would be used to get the consistent backup.

    If Linux's standard filesystem ext3 has the freeze feature, we can do it
    without a commercial filesystem.

    So I have implemented the ioctls of the freeze feature.
    I think we can take the consistent backup with the following steps.
    1. Freeze the filesystem with the freeze ioctl.
    2. Separate the replication volume or create the snapshot
    with the storage device's feature.
    3. Unfreeze the filesystem with the unfreeze ioctl.
    4. Take the backup from the separated replication volume
    or the snapshot.

    This patch:

    VFS:
    Changed the type of write_super_lockfs and unlockfs from "void"
    to "int" so that they can return an error.
    Rename write_super_lockfs and unlockfs of the super block operation
    freeze_fs and unfreeze_fs to avoid a confusion.

    ext3, ext4, xfs, gfs2, jfs:
    Changed the type of write_super_lockfs and unlockfs from "void"
    to "int" so that write_super_lockfs returns an error if needed,
    and unlockfs always returns 0.

    reiserfs:
    Changed the type of write_super_lockfs and unlockfs from "void"
    to "int" so that they always return 0 (success) to keep a current behavior.

    Signed-off-by: Takashi Sato
    Signed-off-by: Masayuki Hamaguchi
    Cc:
    Cc:
    Cc: Christoph Hellwig
    Cc: Dave Kleikamp
    Cc: Dave Chinner
    Cc: Alasdair G Kergon
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Takashi Sato
     

09 Jan, 2009

1 commit

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (57 commits)
    jbd2: Fix oops in jbd2_journal_init_inode() on corrupted fs
    ext4: Remove "extents" mount option
    block: Add Kconfig help which notes that ext4 needs CONFIG_LBD
    ext4: Make printk's consistently prefixed with "EXT4-fs: "
    ext4: Add sanity checks for the superblock before mounting the filesystem
    ext4: Add mount option to set kjournald's I/O priority
    jbd2: Submit writes to the journal using WRITE_SYNC
    jbd2: Add pid and journal device name to the "kjournald2 starting" message
    ext4: Add markers for better debuggability
    ext4: Remove code to create the journal inode
    ext4: provide function to release metadata pages under memory pressure
    ext3: provide function to release metadata pages under memory pressure
    add releasepage hooks to block devices which can be used by file systems
    ext4: Fix s_dirty_blocks_counter if block allocation failed with nodelalloc
    ext4: Init the complete page while building buddy cache
    ext4: Don't allow new groups to be added during block allocation
    ext4: mark the blocks/inode bitmap beyond end of group as used
    ext4: Use new buffer_head flag to check uninit group bitmaps initialization
    ext4: Fix the race between read_inode_bitmap() and ext4_new_inode()
    ext4: code cleanup
    ...

    Linus Torvalds
     

08 Jan, 2009

1 commit


07 Jan, 2009

1 commit

  • s_syncing livelock avoidance was breaking data integrity guarantee of
    sys_sync, by allowing sys_sync to skip writing or waiting for superblocks
    if there is a concurrent sys_sync happening.

    This livelock avoidance is much less important now that we don't have the
    get_super_to_sync() call after every sb that we sync. This was replaced
    by __put_super_and_need_restart.

    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

06 Jan, 2009

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (27 commits)
    GFS2: Use DEFINE_SPINLOCK
    GFS2: Fix use-after-free bug on umount (try #2)
    Revert "GFS2: Fix use-after-free bug on umount"
    GFS2: Streamline alloc calculations for writes
    GFS2: Send useful information with uevent messages
    GFS2: Fix use-after-free bug on umount
    GFS2: Remove ancient, unused code
    GFS2: Move four functions from super.c
    GFS2: Fix bug in gfs2_lock_fs_check_clean()
    GFS2: Send some sensible sysfs stuff
    GFS2: Kill two daemons with one patch
    GFS2: Move gfs2_recoverd into recovery.c
    GFS2: Fix "truncate in progress" hang
    GFS2: Clean up & move gfs2_quotad
    GFS2: Add more detail to debugfs glock dumps
    GFS2: Banish struct gfs2_rgrpd_host
    GFS2: Move rg_free from gfs2_rgrpd_host to gfs2_rgrpd
    GFS2: Move rg_igeneration into struct gfs2_rgrpd
    GFS2: Banish struct gfs2_dinode_host
    GFS2: Move i_size from gfs2_dinode_host and rename it to i_disksize
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    inotify: fix type errors in interfaces
    fix breakage in reiserfs_new_inode()
    fix the treatment of jfs special inodes
    vfs: remove duplicate code in get_fs_type()
    add a vfs_fsync helper
    sys_execve and sys_uselib do not call into fsnotify
    zero i_uid/i_gid on inode allocation
    inode->i_op is never NULL
    ntfs: don't NULL i_op
    isofs check for NULL ->i_op in root directory is dead code
    affs: do not zero ->i_op
    kill suid bit only for regular files
    vfs: lseek(fd, 0, SEEK_CUR) race condition

    Linus Torvalds
     
  • Fsync currently has a fdatawrite/fdatawait pair around the method call,
    and a mutex_lock/unlock of the inode mutex. All callers of fsync have
    to duplicate this, but we have a few and most of them don't quite get
    it right. This patch adds a new vfs_fsync that takes care of this.
    It's a little more complicated as usual as ->fsync might get a NULL file
    pointer and just a dentry from nfsd, but otherwise gets afile and we
    want to take the mapping and file operations from it when it is there.

    Notes on the fsync callers:

    - ecryptfs wasn't calling filemap_fdatawrite / filemap_fdatawait on the
    lower file
    - coda wasn't calling filemap_fdatawrite / filemap_fdatawait on the host
    file, and returning 0 when ->fsync was missing
    - shm wasn't calling either filemap_fdatawrite / filemap_fdatawait nor
    taking i_mutex. Now given that shared memory doesn't have disk
    backing not doing anything in fsync seems fine and I left it out of
    the vfs_fsync conversion for now, but in that case we might just
    not pass it through to the lower file at all but just call the no-op
    simple_sync_file directly.

    [and now actually export vfs_fsync]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

05 Jan, 2009

2 commits

  • This patch implements the FIEMAP ioctl for GFS2. We can use the generic
    code (aside from a lock order issue, solved as per Ted Tso's suggestion)
    for which I've introduced a new variant of the generic function. We also
    have one exception to deal with, namely stuffed files, so we do that
    "by hand", setting all the required flags.

    This has been tested with a modified (I could only find an old version) of
    Eric's test program, and appears to work correctly.

    This patch does not currently support FIEMAP of xattrs, but the plan is to add
    that feature at some future point.

    Signed-off-by: Steven Whitehouse
    Cc: Theodore Tso
    Cc: Eric Sandeen

    Steven Whitehouse
     
  • With the write_begin/write_end aops, page_symlink was broken because it
    could no longer pass a GFP_NOFS type mask into the point where the
    allocations happened. They are done in write_begin, which would always
    assume that the filesystem can be entered from reclaim. This bug could
    cause filesystem deadlocks.

    The funny thing with having a gfp_t mask there is that it doesn't really
    allow the caller to arbitrarily tinker with the context in which it can be
    called. It couldn't ever be GFP_ATOMIC, for example, because it needs to
    take the page lock. The only thing any callers care about is __GFP_FS
    anyway, so turn that into a single flag.

    Add a new flag for write_begin, AOP_FLAG_NOFS. Filesystems can now act on
    this flag in their write_begin function. Change __grab_cache_page to
    accept a nofs argument as well, to honour that flag (while we're there,
    change the name to grab_cache_page_write_begin which is more instructive
    and does away with random leading underscores).

    This is really a more flexible way to go in the end anyway -- if a
    filesystem happens to want any extra allocations aside from the pagecache
    ones in ints write_begin function, it may now use GFP_KERNEL (rather than
    GFP_NOFS) for common case allocations (eg. ocfs2_alloc_write_ctxt, for a
    random example).

    [kosaki.motohiro@jp.fujitsu.com: fix ubifs]
    [kosaki.motohiro@jp.fujitsu.com: fix fuse]
    Signed-off-by: Nick Piggin
    Reviewed-by: KOSAKI Motohiro
    Cc: [2.6.28.x]
    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    [ Cleaned up the calling convention: just pass in the AOP flags
    untouched to the grab_cache_page_write_begin() function. That
    just simplifies everybody, and may even allow future expansion of the
    logic. - Linus ]
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

03 Jan, 2009

1 commit


01 Jan, 2009

1 commit

  • new helpers - insert_inode_locked() and insert_inode_locked4().
    Hash new inode, making sure that there's no such inode in icache
    already. If there is and it does not end up unhashed (as would
    happen if we have nfsd trying to resolve a bogus fhandle), fail.
    Otherwise insert our inode into hash and succeed.

    In either case have i_state set to new+locked; cleanup ends up
    being simpler with such calling conventions.

    Signed-off-by: Al Viro

    Al Viro