05 Feb, 2020

1 commit


04 Jul, 2019

1 commit

  • Stephen writes:
    After merging the driver-core tree, today's linux-next build (x86_64
    allmodconfig) produced this warning:

    fs/orangefs/orangefs-debugfs.c: In function 'orangefs_debugfs_init':
    fs/orangefs/orangefs-debugfs.c:193:1: warning: label 'out' defined but not used [-Wunused-label]
    out:
    ^~~
    fs/orangefs/orangefs-debugfs.c: In function 'orangefs_kernel_debug_init':
    fs/orangefs/orangefs-debugfs.c:204:17: warning: unused variable 'ret' [-Wunused-variable]
    struct dentry *ret;
    ^~~
    Fix this up and change the return type of the function to void as it can
    not fail, which cleans up some more code and variables as well.

    Cc: Mike Marshall
    Cc: Martin Brandenburg
    Cc: devel@lists.orangefs.org
    Reported-by: Stephen Rothwell
    Fixes: f095adba36bb ("orangefs: no need to check return value of debugfs_create functions")
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

03 Jul, 2019

1 commit

  • When calling debugfs functions, there is no need to ever check the
    return value. The function can work or not, but the code logic should
    never do something different based on this.

    Cc: Mike Marshall
    Cc: Martin Brandenburg
    Cc: devel@lists.orangefs.org
    Signed-off-by: Greg Kroah-Hartman
    Link: https://lore.kernel.org/r/20190612152204.GA17511@kroah.com
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

04 May, 2019

1 commit

  • ->readpage looks in file->private_data to try and find out how the
    userspace program set "count" in read(2) or with "dd bs=" or whatever.

    ->readpage uses "count" and inode->i_size to calculate how much
    data Orangefs should deposit in the Orangefs shared buffer, and
    remembers which slot the data is in.

    After copying data from the Orangefs shared buffer slot into
    "the page", readpage tries to increment through the pagecache index
    and fill as many pages as it can from the extra data in the shared
    buffer. Hopefully these extra pages will soon be needed by the vfs,
    and they'll be in the pagecache already.

    Signed-off-by: Mike Marshall
    Signed-off-by: Martin Brandenburg

    Mike Marshall
     

02 Jun, 2018

1 commit


07 Feb, 2018

2 commits


02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

15 Sep, 2017

2 commits


27 Apr, 2017

1 commit

  • If we write zero bytes to this debugfs file, then it will cause an
    underflow when we do copy_from_user(buf, ubuf, count - 1). Debugfs can
    normally only be written to by root so the impact of this is low.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Mike Marshall

    Dan Carpenter
     

26 Feb, 2017

1 commit


10 Feb, 2017

1 commit

  • This patch is simlar to one Dan Carpenter sent me, cleans
    up some return codes and whitespace errors. There was one
    place where he thought inserting an error message into
    the ring buffer might be too chatty, I hope I convinced him
    othewise. As a consolation I changed a truly chatty
    error message in another location into a debug message,
    system-admins had already yelled at me about that one...

    Signed-off-by: Mike Marshall

    Mike Marshall
     

17 Dec, 2016

1 commit

  • Pull vfs updates from Al Viro:

    - more ->d_init() stuff (work.dcache)

    - pathname resolution cleanups (work.namei)

    - a few missing iov_iter primitives - copy_from_iter_full() and
    friends. Either copy the full requested amount, advance the iterator
    and return true, or fail, return false and do _not_ advance the
    iterator. Quite a few open-coded callers converted (and became more
    readable and harder to fuck up that way) (work.iov_iter)

    - several assorted patches, the big one being logfs removal

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    logfs: remove from tree
    vfs: fix put_compat_statfs64() does not handle errors
    namei: fold should_follow_link() with the step into not-followed link
    namei: pass both WALK_GET and WALK_MORE to should_follow_link()
    namei: invert WALK_PUT logics
    namei: shift interpretation of LOOKUP_FOLLOW inside should_follow_link()
    namei: saner calling conventions for mountpoint_last()
    namei.c: get rid of user_path_parent()
    switch getfrag callbacks to ..._full() primitives
    make skb_add_data,{_nocache}() and skb_copy_to_page_nocache() advance only on success
    [iov_iter] new primitives - copy_from_iter_full() and friends
    don't open-code file_inode()
    ceph: switch to use of ->d_init()
    ceph: unify dentry_operations instances
    lustre: switch to use of ->d_init()

    Linus Torvalds
     

13 Dec, 2016

1 commit


05 Dec, 2016

1 commit


17 Nov, 2016

1 commit


07 Nov, 2016

1 commit

  • We recently refactored the Orangefs debugfs code.
    The refactor seemed to trigger dan.carpenter@oracle.com's
    static tester to find a possible double-free in the code.

    While designing the fix we saw a condition under which the
    buffer being freed could also be overflowed.

    We also realized how to rebuild the related debugfs file's
    "contents" (a string) without deleting and re-creating the file.

    This fix should eliminate the possible double-free, the
    potential overflow and improve code readability.

    Signed-off-by: Mike Marshall
    Signed-off-by: Martin Brandenburg

    Mike Marshall
     

11 Oct, 2016

1 commit

  • Pull misc vfs updates from Al Viro:
    "Assorted misc bits and pieces.

    There are several single-topic branches left after this (rename2
    series from Miklos, current_time series from Deepa Dinamani, xattr
    series from Andreas, uaccess stuff from from me) and I'd prefer to
    send those separately"

    * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (39 commits)
    proc: switch auxv to use of __mem_open()
    hpfs: support FIEMAP
    cifs: get rid of unused arguments of CIFSSMBWrite()
    posix_acl: uapi header split
    posix_acl: xattr representation cleanups
    fs/aio.c: eliminate redundant loads in put_aio_ring_file
    fs/internal.h: add const to ns_dentry_operations declaration
    compat: remove compat_printk()
    fs/buffer.c: make __getblk_slow() static
    proc: unsigned file descriptors
    fs/file: more unsigned file descriptors
    fs: compat: remove redundant check of nr_segs
    cachefiles: Fix attempt to read i_blocks after deleting file [ver #2]
    cifs: don't use memcpy() to copy struct iov_iter
    get rid of separate multipage fault-in primitives
    fs: Avoid premature clearing of capabilities
    fs: Give dentry to inode_change_ok() instead of inode
    fuse: Propagate dentry down to inode_change_ok()
    ceph: Propagate dentry down to inode_change_ok()
    xfs: Propagate dentry down to inode_change_ok()
    ...

    Linus Torvalds
     

15 Aug, 2016

1 commit

  • Mostly this is moving code into orangefs-debugfs.c so that globals turn
    into static globals.

    Then gossip_debug_mask is renamed orangefs_gossip_debug_mask but keeps
    global visibility, so it can be used from a macro.

    Signed-off-by: Martin Brandenburg

    Martin Brandenburg
     

08 Aug, 2016

1 commit


09 Apr, 2016

1 commit

  • fs/orangefs/orangefs-debugfs.c:130:2-26: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.

    NULL check before some freeing functions is not needed.

    Based on checkpatch warning
    "kfree(NULL) is safe this check is probably not required"
    and kfreeaddr.cocci by Julia Lawall.

    Generated by: scripts/coccinelle/free/ifnullfree.cocci

    Signed-off-by: Fengguang Wu
    Signed-off-by: Mike Marshall

    kbuild test robot
     

15 Mar, 2016

1 commit


28 Dec, 2015

1 commit


05 Dec, 2015

1 commit