21 Oct, 2006

40 commits

  • Qooting Adrian:

    - net/sunrpc/svc.c uses highest_possible_node_id()

    - include/linux/nodemask.h says highest_possible_node_id() is
    out-of-line #if MAX_NUMNODES > 1

    - the out-of-line highest_possible_node_id() is in lib/cpumask.c

    - lib/Makefile: lib-$(CONFIG_SMP) += cpumask.o
    CONFIG_ARCH_DISCONTIGMEM_ENABLE=y, CONFIG_SMP=n, CONFIG_SUNRPC=y

    -> highest_possible_node_id() is used in net/sunrpc/svc.c
    CONFIG_NODES_SHIFT defined and > 0

    -> include/linux/numa.h: MAX_NUMNODES > 1

    -> compile error

    The bug is not present on architectures where ARCH_DISCONTIGMEM_ENABLE
    depends on NUMA (but m32r isn't the only affected architecture).

    So move the function into page_alloc.c

    Cc: Adrian Bunk
    Cc: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Interrupts must be disabled during alternative instruction patching. On
    systems with high timer IRQ rates, or when running in an emulator, timing
    differences can result in random kernel panics because of running partially
    patched instructions. This doesn't yet fix NMIs, which requires extricating
    the patch code from the late bug checking and is logically separate (and also
    less likely to cause problems).

    Signed-off-by: Zachary Amsden
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zachary Amsden
     
  • We are using NFS_REPLAY_ME as a special error value that is never leaked to
    clients. That works fine; the only problem is mixing host- and network-
    endian values in the same objects. Network-endian equivalent would work just
    as fine; switch to it.

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • don't use the same variable to store NFS and host error values

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • don't use the same variable to store NFS and host error values

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • [pulled from Alexey's patch]

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • on-the-wire data is big-endian

    [mostly pulled from Alexey's patch]

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • [pulled from Alexey's patch]

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • on-the-wire data is big-endian

    [in large part pulled from Alexey's patch]

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • on-the-wire data is big-endian

    [in large part pulled from Alexey's patch]

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • on-the-wire data is big-endian

    [in large part pulled from Alexey's patch]

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • on-the-wire data is big-endian

    [in large part pulled from Alexey's patch]

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Alexey Dobriyan
    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • svc_procfunc instances return __be32, not int

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • a) ERR_PTR(nfserr_something) is a bad idea;
    IS_ERR() will be false for it.
    b) mixing nfserr_.... with -EOPNOTSUPP is
    even worse idea.

    nfsd4_path() does both; caller expects to get NFS protocol error out it if
    anything goes wrong, but if it does we either do not notice (see (a)) or get
    host-endian negative (see (b)).

    IOW, that's a case when we can't use ERR_PTR() to return error, even though we
    return a pointer in case of success.

    Signed-off-by: Al Viro
    Acked-by: Trond Myklebust
    Acked-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Yes, this actually passed tests the way it was.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Lever
     
  • When submitting a request to a fast portmapper (such as the local rpcbind
    daemon), the request can complete before the parent task is even queued up on
    xprt->binding. Fix this by queuing before submitting the rpcbind request.

    Test plan:
    Connectathon locking test with UDP.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Lever
     
  • Coverity spotted a superfluous error check in nfs4_open_revalidate(). Remove
    it.

    Coverity: #cid 847

    Test plan:
    Code inspection; another pass through Coverity.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Lever
     
  • The "!inode" check in __nfs_revalidate_inode() occurs well after the first
    time it is dereferenced, so get rid of it.

    Coverity: #cid 1372, 1373

    Test plan:
    Code review; recheck with Coverity.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Lever
     
  • The original code confused a zero return code from pagevec_add() as success.

    Test plan:
    None.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Lever
     
  • If invalidate_inode_pages2() fails, then it should in principle just be
    because the current process was signalled. In that case, we just want to
    ensure that the inode's page cache remains marked as invalid.

    Also add a helper to allow the O_DIRECT code to simply mark the page cache as
    invalid once it is finished writing, instead of calling
    invalidate_inode_pages2() itself.

    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • The change in semantics for nfs_find_client() introduced by David breaks the
    NFSv4 callback channel.

    Also, replace another completely broken BUG_ON() in nfs_find_client(). In
    initialised clients, clp->cl_cons_state == 0, and callers of that function
    should in any case never want to see clients that are uninitialised.

    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • David forgot to do this. I'm not sure if this is the right place to put
    it....

    Signed-off-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     
  • If the RPC call tanked, we should not be checking the return value
    of data->res.verf->committed, since it is unlikely to even be
    initialised.

    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • Fix two bugs:
    - nfs_inode_remove_request will call nfs_clear_request, so we cannot
    reference req->wb_page after it. Move the call to dec_zone_page_state so
    that it occurs while req->wb_page is still valid.
    - Calling nfs_clear_page_writeback is unnecessary since the radix tree
    tags will have been cleared by the call to nfs_inode_remove_request.
    Replace with a simple call to nfs_unlock_request.

    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • Duh. addr.sin_port should be in network byte order.

    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • Make sure all dentries refs are released before calling kill_anon_super()
    so that the assumption that generic_shutdown_super() can completely destroy
    the dentry tree for there will be no external references holds true.

    What was being done in the put_super() superblock op, is now done in the
    kill_sb() filesystem op instead, prior to calling kill_anon_super().

    The call to shrink_dcache_sb() is removed as it is redundant since
    shrink_dcache_for_umount() will now be called after the cleanup routine.

    Signed-off-by: David Howells
    Acked-by: Ian Kent
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • GENERIC_ACL shouldn't be under Network File Systems (which made it depend
    on NET) as far as I can tell. Having it there and having many (FS) config
    symbols disabled gives this (which the patch fixes):

    mm/built-in.o: In function `shmem_check_acl':
    shmem_acl.c:(.text.shmem_check_acl+0x33): undefined reference to `posix_acl_permission'
    fs/built-in.o: In function `generic_acl_get':
    (.text.generic_acl_get+0x30): undefined reference to `posix_acl_to_xattr'
    fs/built-in.o: In function `generic_acl_set':
    (.text.generic_acl_set+0x75): undefined reference to `posix_acl_from_xattr'
    fs/built-in.o: In function `generic_acl_set':
    (.text.generic_acl_set+0x94): undefined reference to `posix_acl_valid'
    fs/built-in.o: In function `generic_acl_set':
    (.text.generic_acl_set+0xc1): undefined reference to `posix_acl_equiv_mode'
    fs/built-in.o: In function `generic_acl_init':
    (.text.generic_acl_init+0x7a): undefined reference to `posix_acl_clone'
    fs/built-in.o: In function `generic_acl_init':
    (.text.generic_acl_init+0xb4): undefined reference to `posix_acl_clone'
    fs/built-in.o: In function `generic_acl_init':
    (.text.generic_acl_init+0xc8): undefined reference to `posix_acl_create_masq'
    fs/built-in.o: In function `generic_acl_chmod':
    (.text.generic_acl_chmod+0x49): undefined reference to `posix_acl_clone'
    fs/built-in.o: In function `generic_acl_chmod':
    (.text.generic_acl_chmod+0x76): undefined reference to `posix_acl_chmod_masq'

    Signed-off-by: Randy Dunlap
    Acked-by: Andreas Gruenbacher
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap