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
     

11 Oct, 2016

1 commit


28 Sep, 2016

1 commit

  • CURRENT_TIME_SEC is not y2038 safe. current_time() will
    be transitioned to use 64 bit time along with vfs in a
    separate patch.
    There is no plan to transistion CURRENT_TIME_SEC to use
    y2038 safe time interfaces.

    current_time() will also be extended to use superblock
    range checking parameters when range checking is introduced.

    This works because alloc_super() fills in the the s_time_gran
    in super block to NSEC_PER_SEC.

    Signed-off-by: Deepa Dinamani
    Acked-by: Jan Kara
    Signed-off-by: Al Viro

    Deepa Dinamani
     

27 Sep, 2016

2 commits

  • Generated patch:

    sed -i "s/\.rename2\t/\.rename\t\t/" `git grep -wl rename2`
    sed -i "s/\brename2\b/rename/g" `git grep -wl rename2`

    Signed-off-by: Miklos Szeredi

    Miklos Szeredi
     
  • This is trivial to do:

    - add flags argument to foo_rename()
    - check if flags doesn't have any other than RENAME_NOREPLACE
    - assign foo_rename() to .rename2 instead of .rename

    Filesystems converted:

    affs, bfs, exofs, ext2, hfs, hfsplus, jffs2, jfs, logfs, minix, msdos,
    nilfs2, omfs, reiserfs, sysvfs, ubifs, udf, ufs, vfat.

    Signed-off-by: Miklos Szeredi
    Acked-by: Boaz Harrosh
    Acked-by: Richard Weinberger
    Acked-by: Bob Copeland
    Acked-by: Jan Kara
    Cc: Theodore Ts'o
    Cc: Jaegeuk Kim
    Cc: OGAWA Hirofumi
    Cc: Mikulas Patocka
    Cc: David Woodhouse
    Cc: Dave Kleikamp
    Cc: Ryusuke Konishi
    Cc: Christoph Hellwig

    Miklos Szeredi
     

09 May, 2016

1 commit


27 Apr, 2015

1 commit

  • Pull fourth vfs update from Al Viro:
    "d_inode() annotations from David Howells (sat in for-next since before
    the beginning of merge window) + four assorted fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    RCU pathwalk breakage when running into a symlink overmounting something
    fix I_DIO_WAKEUP definition
    direct-io: only inc/dec inode->i_dio_count for file systems
    fs/9p: fix readdir()
    VFS: assorted d_backing_inode() annotations
    VFS: fs/inode.c helpers: d_inode() annotations
    VFS: fs/cachefiles: d_backing_inode() annotations
    VFS: fs library helpers: d_inode() annotations
    VFS: assorted weird filesystems: d_inode() annotations
    VFS: normal filesystems (and lustre): d_inode() annotations
    VFS: security/: d_inode() annotations
    VFS: security/: d_backing_inode() annotations
    VFS: net/: d_inode() annotations
    VFS: net/unix: d_backing_inode() annotations
    VFS: kernel/: d_inode() annotations
    VFS: audit: d_backing_inode() annotations
    VFS: Fix up some ->d_inode accesses in the chelsio driver
    VFS: Cachefiles should perform fs modifications on the top layer only
    VFS: AF_UNIX sockets should call mknod on the top layer only

    Linus Torvalds
     

17 Apr, 2015

1 commit

  • In case of failed memory allocation, the return should be ENOMEM instead
    of ENOSPC.

    Return -EIO when sb_bread() fails.

    Signed-off-by: Sanidhya Kashyap
    Cc: Tigran Aivazian
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sanidhya Kashyap
     

16 Apr, 2015

1 commit


09 Aug, 2014

1 commit

  • All bfs related functions use bfs_ prefix. This patch also moves extern
    declaration to bfs.h and removes prototype from inode.c

    This fixes checkpatch warning:

    WARNING: externs should be avoided in .c files

    Signed-off-by: Fabian Frederick
    Cc: "Tigran A. Aivazian"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     

29 Jun, 2013

1 commit


23 Feb, 2013

1 commit


14 Jul, 2012

2 commits

  • 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

    Al Viro
     
  • 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

    Al Viro
     

04 Jan, 2012

1 commit

  • 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

    Al Viro
     

02 Nov, 2011

1 commit


28 May, 2011

1 commit


26 May, 2011

1 commit


21 Mar, 2011

1 commit

  • The usage of find_first_zero_bit() in bfs_create() is wrong for two
    reasons.

    The bitmap size argument to find_first_zero_bit() is info->si_lasti but
    the correct bitmap size is info->si_lasti + 1 as info->si_lasti is the
    last valid index in info->si_imap bitmap.

    Another problem is that it is impossible to detect that info->si_imap
    bitmap is full because there is an off-by-one bug in the return value
    check for find_first_zero_bit(). If no zero bits exist in info->si_imap,
    find_first_zero_bit() returns info->si_lasti. But the check can't catch
    it due to the off-by-one.

    Signed-off-by: Akinobu Mita
    Acked-by: "Tigran A. Aivazian"
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Akinobu Mita
     

26 Oct, 2010

1 commit


28 May, 2010

1 commit

  • We don't name our generic fsync implementations very well currently.
    The no-op implementation for in-memory filesystems currently is called
    simple_sync_file which doesn't make too much sense to start with,
    the the generic one for simple filesystems is called simple_fsync
    which can lead to some confusion.

    This patch renames the generic file fsync method to generic_file_fsync
    to match the other generic_file_* routines it is supposed to be used
    with, and the no-op implementation to noop_fsync to make it obvious
    what to expect. In addition add some documentation for both methods.

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

    Christoph Hellwig
     

22 May, 2010

1 commit


13 Jul, 2009

1 commit

  • * Remove smp_lock.h from files which don't need it (including some headers!)
    * Add smp_lock.h to files which do need it
    * Make smp_lock.h include conditional in hardirq.h
    It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

    This will make hardirq.h inclusion cheaper for every PREEMPT=n config
    (which includes allmodconfig/allyesconfig, BTW)

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

12 Jun, 2009

1 commit


14 Nov, 2008

1 commit

  • Wrap access to task credentials so that they can be separated more easily from
    the task_struct during the introduction of COW creds.

    Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

    Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
    sense to use RCU directly rather than a convenient wrapper; these will be
    addressed by later patches.

    Signed-off-by: David Howells
    Reviewed-by: James Morris
    Acked-by: Serge Hallyn
    Cc: Tigran A. Aivazian
    Signed-off-by: James Morris

    David Howells
     

23 Oct, 2008

1 commit


14 Sep, 2008

1 commit

  • This fixes:

    =============================================
    [ INFO: possible recursive locking detected ]
    2.6.27-rc5-00283-g70bb089 #68
    ---------------------------------------------
    touch/6855 is trying to acquire lock:
    (&info->bfs_lock){--..}, at: [] bfs_delete_inode+0x9e/0x18c

    but task is already holding lock:
    (&info->bfs_lock){--..}, at: [] bfs_create+0x45/0x187

    other info that might help us debug this:
    2 locks held by touch/6855:
    #0: (&type->i_mutex_dir_key#5){--..}, at: [] do_filp_open+0x10b/0x62f
    #1: (&info->bfs_lock){--..}, at: [] bfs_create+0x45/0x187

    stack backtrace:
    Pid: 6855, comm: touch Not tainted 2.6.27-rc5-00283-g70bb089 #68
    [] validate_chain+0x458/0x9f4
    [] ? trace_hardirqs_off+0xb/0xd
    [] __lock_acquire+0x666/0x6e0
    [] lock_acquire+0x5b/0x77
    [] ? bfs_delete_inode+0x9e/0x18c
    [] mutex_lock_nested+0xbc/0x234
    [] ? bfs_delete_inode+0x9e/0x18c
    [] ? bfs_delete_inode+0x9e/0x18c
    [] bfs_delete_inode+0x9e/0x18c
    [] ? bfs_delete_inode+0x0/0x18c
    [] generic_delete_inode+0x94/0xfe
    [] generic_drop_inode+0x12/0x12f
    [] iput+0x4b/0x4e
    [] bfs_create+0x163/0x187
    [] vfs_create+0xa6/0x114
    [] do_filp_open+0x1ad/0x62f
    [] ? native_sched_clock+0x82/0x96
    [] ? _spin_unlock+0x27/0x3c
    [] ? alloc_fd+0xbf/0xc9
    [] ? sub_preempt_count+0x9d/0xab
    [] ? alloc_fd+0xbf/0xc9
    [] do_sys_open+0x42/0xb8
    [] ? trace_hardirqs_on_thunk+0xc/0x10
    [] sys_open+0x1e/0x26
    [] sysenter_do_call+0x12/0x31
    =======================

    The problem is that we don't unlock the bfs->lock mutex before calling
    iput (we do in the other cases).

    Signed-off-by: Eric Sesterhenn
    Cc: Tigran Aivazian
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sesterhenn
     

27 Jul, 2008

1 commit

  • Replace the BKL-based locking scheme used in the bfs driver by a private
    filesystem-wide mutex.

    Signed-off-by: Dmitri Vorobiev
    Cc: Tigran Aivazian
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitri Vorobiev
     

08 Feb, 2008

1 commit

  • Stop the BFS filesystem from using iget() and read_inode(). Replace
    bfs_read_inode() with bfs_iget(), and call that instead of iget(). bfs_iget()
    then uses iget_locked() directly and returns a proper error code instead of an
    inode in the event of an error.

    bfs_fill_super() returns any error incurred when getting the root inode
    instead of EINVAL.

    [kamalesh@linux.vnet.ibm.com: build fix]
    Signed-off-by: David Howells
    Acked-by: Christoph Hellwig
    Signed-off-by: Kamalesh Babulal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

15 Nov, 2007

1 commit

  • I found a few bugs in the BFS driver. Detailed description of the bugs as
    well as the steps to reproduce the errors are given in the kernel bugzilla.
    Please follow these links for more information:

    http://bugzilla.kernel.org/show_bug.cgi?id=9363
    http://bugzilla.kernel.org/show_bug.cgi?id=9364
    http://bugzilla.kernel.org/show_bug.cgi?id=9365
    http://bugzilla.kernel.org/show_bug.cgi?id=9366

    This patch fixes the bugs described above. Besides, the patch introduces
    coding style changes to make the BFS driver conform to the requirements
    specified for Linux kernel code. Finally, I made a few cosmetic changes
    such as removal of trivial debug output.

    Also, the patch removes the fields `si_lf_ioff' and `si_lf_sblk' of the
    in-core superblock structure. These fields are initialized but never
    actually used.

    If you are wondering why I need BFS, here is the answer: I am using this
    driver in the context of Linux kernel classes I am teaching in the Moscow
    State University and in the International Institute of Information
    Technology in Pune, India.

    Signed-off-by: Dmitri Vorobiev
    Cc: Tigran Aivazian
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitri Vorobiev
     

13 Feb, 2007

1 commit

  • 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
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

09 Dec, 2006

1 commit


01 Oct, 2006

2 commits

  • This is mostly included for parity with dec_nlink(), where we will have some
    more hooks. This one should stay pretty darn straightforward for now.

    Signed-off-by: Dave Hansen
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • 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
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     

27 Sep, 2006

1 commit

  • This eliminates the i_blksize field from struct inode. Filesystems that want
    to provide a per-inode st_blksize can do so by providing their own getattr
    routine instead of using the generic_fillattr() function.

    Note that some filesystems were providing pretty much random (and incorrect)
    values for i_blksize.

    [bunk@stusta.de: cleanup]
    [akpm@osdl.org: generic_fillattr() fix]
    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Theodore Ts'o
     

29 Mar, 2006

1 commit

  • This is a conversion to make the various file_operations structs in fs/
    const. Basically a regexp job, with a few manual fixups

    The goal is both to increase correctness (harder to accidentally write to
    shared datastructures) and reducing the false sharing of cachelines with
    things that get dirty in .data (while .rodata is nicely read only and thus
    cache clean)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

05 Oct, 2005

1 commit


10 Sep, 2005

1 commit

  • * Makes BFS code endianness-clean.

    * Fixes some signedness warnings.

    * Fixes a problem in fs/bfs/inode.c:164 where inodes not synced to disk
    don't get fully marked as clean. Here's how to reproduce it:

    # mount -o loop -t bfs /bfs.img /mnt
    # df -i /mnt
    Filesystem Inodes IUsed IFree IUse% Mounted on
    /bfs.img 48 1 47 3% /mnt
    # df -k /mnt
    Filesystem 1K-blocks Used Available Use% Mounted on
    /bfs.img 512 5 508 1% /mnt
    # cp 60k-archive.zip /mnt/mt.zip
    # df -k /mnt
    Filesystem 1K-blocks Used Available Use% Mounted on
    /bfs.img 512 65 447 13% /mnt
    # df -i /mnt
    Filesystem Inodes IUsed IFree IUse% Mounted on
    /bfs.img 48 2 46 5% /mnt
    # rm /mnt/mt.zip
    # echo $?
    0

    [If the unlink happens before the buffers flush, the following happens:]

    # df -i /mnt
    Filesystem Inodes IUsed IFree IUse% Mounted on
    /bfs.img 48 2 46 5% /mnt
    # df -k /mnt
    Filesystem 1K-blocks Used Available Use% Mounted on
    /bfs.img 512 65 447 13% /mnt

    fs/bfs/bfs.h | 1

    Signed-off-by: Andrew Stribblehill
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Stribblehill
     

17 Apr, 2005

1 commit

  • 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!

    Linus Torvalds