28 Apr, 2008

10 commits

  • The MPOL_BIND policy creates a zonelist that is used for allocations
    controlled by that mempolicy. As the per-node zonelist is already being
    filtered based on a zone id, this patch adds a version of __alloc_pages() that
    takes a nodemask for further filtering. This eliminates the need for
    MPOL_BIND to create a custom zonelist.

    A positive benefit of this is that allocations using MPOL_BIND now use the
    local node's distance-ordered zonelist instead of a custom node-id-ordered
    zonelist. I.e., pages will be allocated from the closest allowed node with
    available memory.

    [Lee.Schermerhorn@hp.com: Mempolicy: update stale documentation and comments]
    [Lee.Schermerhorn@hp.com: Mempolicy: make dequeue_huge_page_vma() obey MPOL_BIND nodemask]
    [Lee.Schermerhorn@hp.com: Mempolicy: make dequeue_huge_page_vma() obey MPOL_BIND nodemask rework]
    Signed-off-by: Mel Gorman
    Acked-by: Christoph Lameter
    Signed-off-by: Lee Schermerhorn
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: Hugh Dickins
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • Filtering zonelists requires very frequent use of zone_idx(). This is costly
    as it involves a lookup of another structure and a substraction operation. As
    the zone_idx is often required, it should be quickly accessible. The node idx
    could also be stored here if it was found that accessing zone->node is
    significant which may be the case on workloads where nodemasks are heavily
    used.

    This patch introduces a struct zoneref to store a zone pointer and a zone
    index. The zonelist then consists of an array of these struct zonerefs which
    are looked up as necessary. Helpers are given for accessing the zone index as
    well as the node index.

    [kamezawa.hiroyu@jp.fujitsu.com: Suggested struct zoneref instead of embedding information in pointers]
    [hugh@veritas.com: mm-have-zonelist: fix memcg ooms]
    [hugh@veritas.com: just return do_try_to_free_pages]
    [hugh@veritas.com: do_try_to_free_pages gfp_mask redundant]
    Signed-off-by: Mel Gorman
    Acked-by: Christoph Lameter
    Acked-by: David Rientjes
    Signed-off-by: Lee Schermerhorn
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: Christoph Lameter
    Cc: Nick Piggin
    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • Currently a node has two sets of zonelists, one for each zone type in the
    system and a second set for GFP_THISNODE allocations. Based on the zones
    allowed by a gfp mask, one of these zonelists is selected. All of these
    zonelists consume memory and occupy cache lines.

    This patch replaces the multiple zonelists per-node with two zonelists. The
    first contains all populated zones in the system, ordered by distance, for
    fallback allocations when the target/preferred node has no free pages. The
    second contains all populated zones in the node suitable for GFP_THISNODE
    allocations.

    An iterator macro is introduced called for_each_zone_zonelist() that interates
    through each zone allowed by the GFP flags in the selected zonelist.

    Signed-off-by: Mel Gorman
    Acked-by: Christoph Lameter
    Signed-off-by: Lee Schermerhorn
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: Christoph Lameter
    Cc: Hugh Dickins
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • Introduce a node_zonelist() helper function. It is used to lookup the
    appropriate zonelist given a node and a GFP mask. The patch on its own is a
    cleanup but it helps clarify parts of the two-zonelist-per-node patchset. If
    necessary, it can be merged with the next patch in this set without problems.

    Reviewed-by: Christoph Lameter
    Signed-off-by: Mel Gorman
    Signed-off-by: Lee Schermerhorn
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: Christoph Lameter
    Cc: Hugh Dickins
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • The following patches replace multiple zonelists per node with two zonelists
    that are filtered based on the GFP flags. The patches as a set fix a bug with
    regard to the use of MPOL_BIND and ZONE_MOVABLE. With this patchset, the
    MPOL_BIND will apply to the two highest zones when the highest zone is
    ZONE_MOVABLE. This should be considered as an alternative fix for the
    MPOL_BIND+ZONE_MOVABLE in 2.6.23 to the previously discussed hack that filters
    only custom zonelists.

    The first patch cleans up an inconsistency where direct reclaim uses
    zonelist->zones where other places use zonelist.

    The second patch introduces a helper function node_zonelist() for looking up
    the appropriate zonelist for a GFP mask which simplifies patches later in the
    set.

    The third patch defines/remembers the "preferred zone" for numa statistics, as
    it is no longer always the first zone in a zonelist.

    The forth patch replaces multiple zonelists with two zonelists that are
    filtered. The two zonelists are due to the fact that the memoryless patchset
    introduces a second set of zonelists for __GFP_THISNODE.

    The fifth patch introduces helper macros for retrieving the zone and node
    indices of entries in a zonelist.

    The final patch introduces filtering of the zonelists based on a nodemask.
    Two zonelists exist per node, one for normal allocations and one for
    __GFP_THISNODE.

    Performance results varied depending on the machine configuration. In real
    workloads the gain/loss will depend on how much the userspace portion of the
    benchmark benefits from having more cache available due to reduced referencing
    of zonelists.

    These are the range of performance losses/gains when running against
    2.6.24-rc4-mm1. The set and these machines are a mix of i386, x86_64 and
    ppc64 both NUMA and non-NUMA.
    loss to gain
    Total CPU time on Kernbench: -0.86% to 1.13%
    Elapsed time on Kernbench: -0.79% to 0.76%
    page_test from aim9: -4.37% to 0.79%
    brk_test from aim9: -0.71% to 4.07%
    fork_test from aim9: -1.84% to 4.60%
    exec_test from aim9: -0.71% to 1.08%

    This patch:

    The allocator deals with zonelists which indicate the order in which zones
    should be targeted for an allocation. Similarly, direct reclaim of pages
    iterates over an array of zones. For consistency, this patch converts direct
    reclaim to use a zonelist. No functionality is changed by this patch. This
    simplifies zonelist iterators in the next patch.

    Signed-off-by: Mel Gorman
    Acked-by: Christoph Lameter
    Signed-off-by: Lee Schermerhorn
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: Christoph Lameter
    Cc: Hugh Dickins
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • Make the needlessly global swap_pte_to_pagemap_entry() static.

    Signed-off-by: Adrian Bunk
    Acked-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Nothing in the tree uses nopage any more. Remove support for it in the
    core mm code and documentation (and a few stray references to it in
    comments).

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

    Nick Piggin
     
  • Migrate flags must be set on slab creation as agreed upon when the antifrag
    logic was reviewed. Otherwise some slabs of a slabcache will end up in the
    unmovable and others in the reclaimable section depending on which flag was
    active when a new slab page was allocated.

    This likely slid in somehow when antifrag was merged. Remove it.

    The buffer_heads are always allocated with __GFP_RECLAIMABLE because the
    SLAB_RECLAIM_ACCOUNT option is set. The set_migrateflags() never had any
    effect there.

    Radix tree allocations are not directly reclaimable but they are allocated
    with __GFP_RECLAIMABLE set on each allocation. We now set
    SLAB_RECLAIM_ACCOUNT on radix tree slab creation making sure that radix
    tree slabs are consistently placed in the reclaimable section. Radix tree
    slabs will also be accounted as such.

    There is then no user left of set_migratepages. So remove it.

    Signed-off-by: Christoph Lameter
    Cc: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • This patch wakes up a thread waiting in io_getevents if another thread
    destroys the context. This was tested using a small program that spawns a
    thread to wait in io_getevents while the parent thread destroys the io context
    and then waits for the getevents thread to exit. Without this patch, the
    program hangs indefinitely. With the patch, the program exits as expected.

    Signed-off-by: Jeff Moyer
    Cc: Zach Brown
    Cc: Christopher Smith
    Cc: Benjamin LaHaise
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Moyer
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (40 commits)
    [SCSI] jazz_esp, sgiwd93, sni_53c710, sun3x_esp: fix platform driver hotplug/coldplug
    [SCSI] aic7xxx: add const
    [SCSI] aic7xxx: add static
    [SCSI] aic7xxx: Update _shipped files
    [SCSI] aic7xxx: teach aicasm to not emit unused debug code/data
    [SCSI] qla2xxx: Update version number to 8.02.01-k2.
    [SCSI] qla2xxx: Correct regression in relogin code.
    [SCSI] qla2xxx: Correct misc. endian and byte-ordering issues.
    [SCSI] qla2xxx: make qla2x00_issue_iocb_timeout() static
    [SCSI] qla2xxx: qla_os.c, make 2 functions static
    [SCSI] qla2xxx: Re-register FDMI information after a LIP.
    [SCSI] qla2xxx: Correct SRB usage-after-completion/free issues.
    [SCSI] qla2xxx: Correct ISP84XX verify-chip response handling.
    [SCSI] qla2xxx: Wakeup DPC thread to process any deferred-work requests.
    [SCSI] qla2xxx: Collapse RISC-RAM retrieval code during a firmware-dump.
    [SCSI] m68k: new mac_esp scsi driver
    [SCSI] zfcp: Add some statistics provided by the FCP adapter to the sysfs
    [SCSI] zfcp: Print some messages only during ERP
    [SCSI] zfcp: Wait for free SBAL during exchange config
    [SCSI] scsi_transport_fc: fc_user_scan correction
    ...

    Linus Torvalds
     

26 Apr, 2008

11 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    [PATCH] sanitize locate_fd()
    [PATCH] sanitize unshare_files/reset_files_struct
    [PATCH] sanitize handling of shared descriptor tables in failing execve()
    [PATCH] close race in unshare_files()
    [PATCH] restore sane ->umount_begin() API
    cifs: timeout dfs automounts +little fix.

    Linus Torvalds
     
  • Commit 1a747ee0 ("locks: don't call ->copy_lock methods on return of
    conflicting locks") changed fs/lockd/svclock.c to call
    __locks_copy_lock() instead of locks_copy_lock(), but lockd can be built
    as a module and __locks_copy_lock() is not exported, which causes a
    build error

    ERROR: "__locks_copy_lock" [fs/lockd/lockd.ko] undefined!

    with CONFIG_LOCKD=m.

    Fix this by exporting __locks_copy_lock().

    Signed-off-by: Roland Dreier
    Signed-off-by: Linus Torvalds

    Roland Dreier
     
  • * git://git.infradead.org/mtd-2.6: (82 commits)
    [MTD] m25p80: Add Support for ATMEL AT25DF641 64-Megabit SPI Flash
    [MTD] m25p80: add FAST_READ access support to M25Pxx
    [MTD] [NAND] bf5xx_nand: Avoid crash if bfin_mac is installed.
    [MTD] [NAND] at91_nand: control NCE signal
    [MTD] [NAND] AT91 hardware ECC compile fix for at91sam9263 / at91sam9260
    [MTD] [NAND] Hardware ECC controller on at91sam9263 / at91sam9260
    [JFFS2] Introduce dbg_readinode2 log level, use it to shut read_dnode() up
    [JFFS2] Fix jffs2_reserve_space() when all blocks are pending erasure.
    [JFFS2] Add erase_checking_list to hold blocks being marked.
    UBI: add a message
    [JFFS2] Return values of jffs2_block_check_erase error paths
    [MTD] Clean up AR7 partition map support
    [MTD] [NOR] Fix Intel CFI driver for collie flash
    [JFFS2] Finally remove redundant ref->__totlen field.
    [JFFS2] Honour TEST_TOTLEN macro in debugging code. ref->__totlen is going!
    [JFFS2] Add paranoia debugging for superblock counts
    [JFFS2] Fix free space leak with in-band cleanmarkers
    [JFFS2] Self-sufficient #includes in jffs2_fs_i.h: include
    [MTD] [NAND] Verify probe by retrying to checking the results match
    [MTD] [NAND] S3C2410 Allow ECC disable to be specified by the board
    ...

    Linus Torvalds
     
  • Presumably this is left over from earlier drafts of v4, which listed
    TIME_METADATA as writeable. It's read-only in rfc 3530, and shouldn't
    be modifiable anyway.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • The file_lock structure is used both as a heavy-weight representation of
    an active lock, with pointers to reference-counted structures, etc., and
    as a simple container for parameters that describe a file lock.

    The conflicting lock returned from __posix_lock_file is an example of
    the latter; so don't call the filesystem or lock manager callbacks when
    copying to it. This also saves the need for an unnecessary
    locks_init_lock in the nfsv4 server.

    Thanks to Trond for pointing out the error.

    Signed-off-by: J. Bruce Fields
    Cc: Trond Myklebust

    J. Bruce Fields
     
  • Add /proc/fs/nfsd/unlock_filesystem, which allows e.g.:

    shell> echo /mnt/sfs1 > /proc/fs/nfsd/unlock_filesystem

    so that a filesystem can be unmounted before allowing a peer nfsd to
    take over nfs service for the filesystem.

    Signed-off-by: S. Wendy Cheng
    Cc: Lon Hohberger
    Cc: Christoph Hellwig
    Signed-off-by: J. Bruce Fields

    fs/lockd/svcsubs.c | 66 +++++++++++++++++++++++++++++++++++++++-----
    fs/nfsd/nfsctl.c | 65 +++++++++++++++++++++++++++++++++++++++++++
    include/linux/lockd/lockd.h | 7 ++++
    3 files changed, 131 insertions(+), 7 deletions(-)

    Wendy Cheng
     
  • For high-availability NFS service, we generally need to be able to drop
    file locks held on the exported filesystem before moving clients to a
    new server. Currently the only way to do that is by shutting down lockd
    entirely, which is often undesireable (for example, if you want to
    continue exporting other filesystems).

    This patch allows the administrator to release all locks held by clients
    accessing the client through a given server ip address, by echoing that
    address to a new file, /proc/fs/nfsd/unlock_ip, as in:

    shell> echo 10.1.1.2 > /proc/fs/nfsd/unlock_ip

    The expected sequence of events can be:
    1. Tear down the IP address
    2. Unexport the path
    3. Write IP to /proc/fs/nfsd/unlock_ip to unlock files
    4. Signal peer to begin take-over.

    For now we only support IPv4 addresses and NFSv2/v3 (NFSv4 locks are not
    affected).

    Also, if unmounting the filesystem is required, we assume at step 3 that
    clients using the given server ip are the only clients holding locks on
    the given filesystem; otherwise, an additional patch is required to
    allow revoking all locks held by lockd on a given filesystem.

    Signed-off-by: S. Wendy Cheng
    Cc: Lon Hohberger
    Cc: Christoph Hellwig
    Signed-off-by: J. Bruce Fields

    fs/lockd/svcsubs.c | 66 +++++++++++++++++++++++++++++++++++++++-----
    fs/nfsd/nfsctl.c | 65 +++++++++++++++++++++++++++++++++++++++++++
    include/linux/lockd/lockd.h | 7 ++++
    3 files changed, 131 insertions(+), 7 deletions(-)

    Wendy Cheng
     
  • fcntl_setlease() has a struct dentry* that is used only once; this patch
    removes it.

    Signed-off-by: David M. Richter
    Signed-off-by: J. Bruce Fields

    David M. Richter
     
  • In generic_setlease(), the struct file_lock is allocated after tests for the
    presence of conflicting readers/writers is done, despite the fact that the
    allocation might block; this patch moves the allocation earlier. A subsequent
    set of patches will rely on this behavior to properly serialize between a
    modified __break_lease() and generic_setlease().

    Signed-off-by: David M. Richter
    Signed-off-by: J. Bruce Fields

    David M. Richter
     
  • In generic_setlease(), we don't need to allocate a new struct file_lock
    or check for readers or writers when called with F_UNLCK.

    Signed-off-by: David M. Richter
    Signed-off-by: J. Bruce Fields

    David M. Richter
     
  • Fixes a return-value mixup from 85c59580b30c82aa771aa33b37217a6b6851bc14
    "locks: Fix potential OOPS in generic_setlease()", in which -ENOMEM replaced
    what had been intended to stay -EAGAIN in the variable "error".

    Signed-off-by: David M. Richter
    Signed-off-by: J. Bruce Fields

    David M. Richter
     

25 Apr, 2008

10 commits

  • * 'file' argument is unused; lose it.
    * move setting flags from the caller (dupfd()) to locate_fd();
    pass cloexec flag as new argument. Note that files_fdtable()
    that used to be in dupfd() isn't needed in the place in
    locate_fd() where the moved code ends up - we know that ->file_lock
    hadn't been dropped since the last time we calculated fdt because
    we can get there only if expand_files() returns 0 and it doesn't
    drop/reacquire in that case.
    * move getting/dropping ->file_lock into locate_fd(). Now the caller
    doesn't need to do anything with files_struct *files anymore and
    we can move that inside locate_fd() as well, killing the
    struct files_struct * argument.

    At that point locate_fd() is extremely similar to get_unused_fd_flags()
    and the next patches will merge those two.

    Signed-off-by: Al Viro

    Al Viro
     
  • * let unshare_files() give caller the displaced files_struct
    * don't bother with grabbing reference only to drop it in the
    caller if it hadn't been shared in the first place
    * in that form unshare_files() is trivially implemented via
    unshare_fd(), so we eliminate the duplicate logics in fork.c
    * reset_files_struct() is not just only called for current;
    it will break the system if somebody ever calls it for anything
    else (we can't modify ->files of somebody else). Lose the
    task_struct * argument.

    Signed-off-by: Al Viro

    Al Viro
     
  • * unshare_files() can fail; doing it after irreversible actions is wrong
    and de_thread() is certainly irreversible.
    * since we do it unconditionally anyway, we might as well do it in do_execve()
    and save ourselves the PITA in binfmt handlers, etc.
    * while we are at it, binfmt_som actually leaked files_struct on failure.

    As a side benefit, unshare_files(), put_files_struct() and reset_files_struct()
    become unexported.

    Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

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

    Igor Mammedov
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    [CIFS] Fix typo in previous commit
    [CIFS] Fix define for new proxy cap to match documentation
    [CIFS] Fix UNC path prefix on QueryUnixPathInfo to have correct slash
    [CIFS] Reserve new proxy cap for WAFS
    [CIFS] Add various missing flags and defintions
    [CIFS] make cifs_dfs_automount_list_static
    [CIFS] Fix oops when slow oplock process races with unmount
    [CIFS] Fix acl length when very short ACL being modified by chmod
    [CIFS] Fix looping on reconnect to Samba when unexpected tree connect fail on reconnect
    [CIFS] minor update to change log

    Linus Torvalds
     
  • * git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (80 commits)
    SUNRPC: Invalidate the RPCSEC_GSS session if the server dropped the request
    make nfs_automount_list static
    NFS: remove duplicate flags assignment from nfs_validate_mount_data
    NFS - fix potential NULL pointer dereference v2
    SUNRPC: Don't change the RPCSEC_GSS context on a credential that is in use
    SUNRPC: Fix a race in gss_refresh_upcall()
    SUNRPC: Don't disconnect more than once if retransmitting NFSv4 requests
    SUNRPC: Remove the unused export of xprt_force_disconnect
    SUNRPC: remove XS_SENDMSG_RETRY
    SUNRPC: Protect creds against early garbage collection
    NFSv4: Attempt to use machine credentials in SETCLIENTID calls
    NFSv4: Reintroduce machine creds
    NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid()
    nfs: fix printout of multiword bitfields
    nfs: return negative error value from nfs{,4}_stat_to_errno
    NLM/lockd: Ensure client locking calls use correct credentials
    NFS: Remove the buggy lock-if-signalled case from do_setlk()
    NLM/lockd: Fix a race when cancelling a blocking lock
    NLM/lockd: Ensure that nlmclnt_cancel() returns results of the CANCEL call
    NLM: Remove the signal masking in nlmclnt_proc/nlmclnt_cancel
    ...

    Linus Torvalds
     
  • Trond Myklebust
     
  • Signed-off-by: Steve French

    Steve French
     
  • The transport encryption capability and new SetFSInfo level were missing, and the
    new proxy capability (which Samba server is implementing) and proxy setfsinfo needed
    to be moved down to not collide with Samba's transport encryption capability.

    CC: Jeremy Allison
    CC: Sam Liddicott
    Signed-off-by: Steve French

    Steve French
     

24 Apr, 2008

9 commits

  • Steve French
     
  • Currently, knfsd only clears the setuid bit if the owner of a file is
    changed on a SETATTR call, and only clears the setgid bit if the group
    is changed. POSIX says this in the spec for chown():

    "If the specified file is a regular file, one or more of the
    S_IXUSR, S_IXGRP, or S_IXOTH bits of the file mode are set, and the
    process does not have appropriate privileges, the set-user-ID
    (S_ISUID) and set-group-ID (S_ISGID) bits of the file mode shall
    be cleared upon successful return from chown()."

    If I'm reading this correctly, then knfsd is doing this wrong. It should
    be clearing both the setuid and setgid bit on any SETATTR that changes
    the uid or gid. This wasn't really as noticable before, but now that the
    ATTR_KILL_S*ID bits are a no-op for the NFS client, it's more evident.

    This patch corrects the nfsd_setattr logic so that this occurs. It also
    does a bit of cleanup to the function.

    There is also one small behavioral change. If a SETATTR call comes in
    that changes the uid/gid and the mode, then we now only clear the setgid
    bit if the group execute bit isn't set. The setgid bit without a group
    execute bit signifies mandatory locking and we likely don't want to
    clear the bit in that case. Since there is no call in POSIX that should
    generate a SETATTR call like this, then this should rarely happen, but
    it's worth noting.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • ...it's not really needed.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • When svc_recv returns an unexpected error, lockd will print a warning
    and exit. This problematic for several reasons. In particular, it will
    cause the reference counts for the thread to be wrong, and can lead to a
    potential BUG() call.

    Rather than exiting on error from svc_recv, have the thread do a 1s
    sleep and then retry the loop. This is unlikely to cause any harm, and
    if the error turns out to be something temporary then it may be able to
    recover.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • When svc_recv returns an unexpected error, nfs_callback_svc will print a
    warning and exit. This problematic for several reasons. In particular,
    it will cause the reference counts for the thread to be wrong, and no
    new thread will be started until all nfs4 mounts are unmounted.

    Rather than exiting on error from svc_recv, have the thread do a 1s
    sleep and then retry the loop. This is unlikely to cause any harm, and
    if the error turns out to be something temporary then it may be able to
    recover.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • There's no need to dynamically allocate this memory, and doing so may
    create the possibility of races on shutdown of the rpc client. (We've
    witnessed it only after adding rpcsec_gss support to the server, after
    which the rpc code can send destroys calls that expect to still be able
    to access the rpc_stats structure after it has been destroyed.)

    Such races are in theory possible if the module containing this "static"
    memory is removed very quickly after an rpc client is destroyed, but
    we haven't seen that happen.

    Signed-off-by: J. Bruce Fields

    Olga Kornievskaia
     
  • Obvious comment nit.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • As of 5996a298da43a03081e9ba2116983d173001c862 ("NLM: don't unlock on
    cancel requests") we no longer unlock in this case, so the comment is no
    longer accurate.

    Thanks to Stuart Friedberg for pointing out the inconsistency.

    Cc: Stuart Friedberg
    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • Clean up: Because NFSD_V4 "depends on" NFSD_V3, it appears as a child of
    the NFSD_V3 menu entry, and is not visible if NFSD_V3 is unselected.

    Replace the dependency on NFSD_V3 with a "select NFSD_V3". This makes
    NFSD_V4 look and work just like NFS_V3, while ensuring that NFSD_V3 is
    enabled if NFSD_V4 is.

    Sam Ravnborg adds:

    "This use of select is questionable. In general it is bad to select
    a symbol with dependencies.

    In this case the dependencies of NFSD_V3 are duplicated for NFSD_V4
    so we will not se erratic configurations but do you remember to
    update NFSD_V4 when you add a depends on NFSD_V3?

    But I see no other clean way to do it right now."

    Later he said:

    "My comment was more to say we have things to address in kconfig.
    This is abuse in the acceptable range."

    Signed-off-by: Chuck Lever
    Signed-off-by: J. Bruce Fields

    Chuck Lever