31 Aug, 2020

1 commit

  • The basic permission bits (protection bits in AmigaOS) have been broken
    in Linux' AFFS - it would only set bits, but never delete them.
    Also, contrary to the documentation, the Archived bit was not handled.

    Let's fix this for good, and set the bits such that Linux and classic
    AmigaOS can coexist in the most peaceful manner.

    Also, update the documentation to represent the current state of things.

    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Cc: stable@vger.kernel.org
    Signed-off-by: Max Staudt
    Signed-off-by: David Sterba

    Max Staudt
     

24 Jun, 2020

1 commit


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
     

01 Aug, 2017

1 commit

  • This patch converts most of the in-kernel filesystems that do writeback
    out of the pagecache to report errors using the errseq_t-based
    infrastructure that was recently added. This allows them to report
    errors once for each open file description.

    Most filesystems have a fairly straightforward fsync operation. They
    call filemap_write_and_wait_range to write back all of the data and
    wait on it, and then (sometimes) sync out the metadata.

    For those filesystems this is a straightforward conversion from calling
    filemap_write_and_wait_range in their fsync operation to calling
    file_write_and_wait_range.

    Acked-by: Jan Kara
    Acked-by: Dave Kleikamp
    Signed-off-by: Jeff Layton

    Jeff Layton
     

27 Apr, 2017

2 commits

  • Previous AFFS patch fixed OFS write operations but unveiled
    another bug: files greater than 4KB are being created with a wrong
    size resulting in errors like the following:

    dd if=/dev/zero of=file bs=4097 count=1
    cp file /mnt/affs/
    cp: error writing '/mnt/affs/file': Bad address

    Signed-off-by: Fabian Frederick
    Signed-off-by: Al Viro

    Fabian Frederick
     
  • We called unconditionally affs_bread_ino() with create 0 resulting in
    "error (device ...): get_block(): strange block request 0"
    when trying to write on AFFS OFS format.

    This patch adds create parameter to that function.
    0 for affs_readpage_ofs()
    1 for affs_write_begin_ofs()

    Bug was found here:
    https://bugzilla.kernel.org/show_bug.cgi?id=114961

    Signed-off-by: Fabian Frederick
    Signed-off-by: Al Viro

    Fabian Frederick
     

02 May, 2016

1 commit


05 Apr, 2016

1 commit

  • PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
    ago with promise that one day it will be possible to implement page
    cache with bigger chunks than PAGE_SIZE.

    This promise never materialized. And unlikely will.

    We have many places where PAGE_CACHE_SIZE assumed to be equal to
    PAGE_SIZE. And it's constant source of confusion on whether
    PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
    especially on the border between fs and mm.

    Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
    breakage to be doable.

    Let's stop pretending that pages in page cache are special. They are
    not.

    The changes are pretty straight-forward:

    - << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> ;

    - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};

    - page_cache_get() -> get_page();

    - page_cache_release() -> put_page();

    This patch contains automated changes generated with coccinelle using
    script below. For some reason, coccinelle doesn't patch header files.
    I've called spatch for them manually.

    The only adjustment after coccinelle is revert of changes to
    PAGE_CAHCE_ALIGN definition: we are going to drop it later.

    There are few places in the code where coccinelle didn't reach. I'll
    fix them manually in a separate patch. Comments and documentation also
    will be addressed with the separate patch.

    virtual patch

    @@
    expression E;
    @@
    - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
    + E

    @@
    expression E;
    @@
    - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
    + E

    @@
    @@
    - PAGE_CACHE_SHIFT
    + PAGE_SHIFT

    @@
    @@
    - PAGE_CACHE_SIZE
    + PAGE_SIZE

    @@
    @@
    - PAGE_CACHE_MASK
    + PAGE_MASK

    @@
    expression E;
    @@
    - PAGE_CACHE_ALIGN(E)
    + PAGE_ALIGN(E)

    @@
    expression E;
    @@
    - page_cache_get(E)
    + get_page(E)

    @@
    expression E;
    @@
    - page_cache_release(E)
    + put_page(E)

    Signed-off-by: Kirill A. Shutemov
    Acked-by: Michal Hocko
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

20 Feb, 2016

1 commit


23 Jan, 2016

1 commit

  • parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
    inode_foo(inode) being mutex_foo(&inode->i_mutex).

    Please, use those for access to ->i_mutex; over the coming cycle
    ->i_mutex will become rwsem, with ->lookup() done with it held
    only shared.

    Signed-off-by: Al Viro

    Al Viro
     

17 Apr, 2015

3 commits

  • Merge third patchbomb from Andrew Morton:

    - various misc things

    - a couple of lib/ optimisations

    - provide DIV_ROUND_CLOSEST_ULL()

    - checkpatch updates

    - rtc tree

    - befs, nilfs2, hfs, hfsplus, fatfs, adfs, affs, bfs

    - ptrace fixes

    - fork() fixes

    - seccomp cleanups

    - more mmap_sem hold time reductions from Davidlohr

    * emailed patches from Andrew Morton : (138 commits)
    proc: show locks in /proc/pid/fdinfo/X
    docs: add missing and new /proc/PID/status file entries, fix typos
    drivers/rtc/rtc-at91rm9200.c: make IO endian agnostic
    Documentation/spi/spidev_test.c: fix warning
    drivers/rtc/rtc-s5m.c: allow usage on device type different than main MFD type
    .gitignore: ignore *.tar
    MAINTAINERS: add Mediatek SoC mailing list
    tomoyo: reduce mmap_sem hold for mm->exe_file
    powerpc/oprofile: reduce mmap_sem hold for exe_file
    oprofile: reduce mmap_sem hold for mm->exe_file
    mips: ip32: add platform data hooks to use DS1685 driver
    lib/Kconfig: fix up HAVE_ARCH_BITREVERSE help text
    x86: switch to using asm-generic for seccomp.h
    sparc: switch to using asm-generic for seccomp.h
    powerpc: switch to using asm-generic for seccomp.h
    parisc: switch to using asm-generic for seccomp.h
    mips: switch to using asm-generic for seccomp.h
    microblaze: use asm-generic for seccomp.h
    arm: use asm-generic for seccomp.h
    seccomp: allow COMPAT sigreturn overrides
    ...

    Linus Torvalds
     
  • Replace mount option test by affs_test_opt().

    Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • Currently, affs still uses direct access on mount_options. This patch
    prepares to use affs_clear/set/test_opt() like other filesystems.

    Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     

12 Apr, 2015

4 commits


09 Apr, 2015

1 commit


26 Mar, 2015

2 commits

  • struct kiocb now is a generic I/O container, so move it to fs.h.
    Also do a #include diet for aio.h while we're at it.

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

    Christoph Hellwig
     
  • When affs_bread_ino() fails, correctly unlock the page and release the
    page cache with proper error value. All write_end() should
    unlock/release the page that was locked by write_beg().

    Signed-off-by: Taesoo Kim
    Cc: Fabian Frederick
    Cc: Al Viro
    Cc: Geert Uytterhoeven
    Cc: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Taesoo Kim
     

18 Feb, 2015

3 commits

  • Use the same fallback to normal IO in case of write
    operations beyond EOF as fat direct IO. This patch fixes

    fsx file -d -Z -r 4096 -w 4096

    Report:
    129(129 mod 256): TRUNCATE DOWN from 0x3ff01 to 0xb3f6
    130(130 mod 256): WRITE 0x22000 thru 0x2dfff (0xc000 bytes) HOLE

    Thanks to Jan for helping me on this problem.

    The ideal solution suggested by Jan Kara would be to use
    cont_write_begin() but affs direct_IO shouldn't be used a lot anyway...

    Signed-off-by: Fabian Frederick
    Reviewed-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     
  • - "inode.i_ino" is "unsigned long",
    - "loff_t" is always "unsigned long long",
    - "sector_t" should be cast to "unsigned long long" for printing,
    - "u32" should not be cast to "unsigned int" for printing.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     

14 Dec, 2014

4 commits


14 Oct, 2014

1 commit


13 Jun, 2014

1 commit

  • Pull vfs updates from Al Viro:
    "This the bunch that sat in -next + lock_parent() fix. This is the
    minimal set; there's more pending stuff.

    In particular, I really hope to get acct.c fixes merged this cycle -
    we need that to deal sanely with delayed-mntput stuff. In the next
    pile, hopefully - that series is fairly short and localized
    (kernel/acct.c, fs/super.c and fs/namespace.c). In this pile: more
    iov_iter work. Most of prereqs for ->splice_write with sane locking
    order are there and Kent's dio rewrite would also fit nicely on top of
    this pile"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (70 commits)
    lock_parent: don't step on stale ->d_parent of all-but-freed one
    kill generic_file_splice_write()
    ceph: switch to iter_file_splice_write()
    shmem: switch to iter_file_splice_write()
    nfs: switch to iter_splice_write_file()
    fs/splice.c: remove unneeded exports
    ocfs2: switch to iter_file_splice_write()
    ->splice_write() via ->write_iter()
    bio_vec-backed iov_iter
    optimize copy_page_{to,from}_iter()
    bury generic_file_aio_{read,write}
    lustre: get rid of messing with iovecs
    ceph: switch to ->write_iter()
    ceph_sync_direct_write: stop poking into iov_iter guts
    ceph_sync_read: stop poking into iov_iter guts
    new helper: copy_page_from_iter()
    fuse: switch to ->write_iter()
    btrfs: switch to ->write_iter()
    ocfs2: switch to ->write_iter()
    xfs: switch to ->write_iter()
    ...

    Linus Torvalds
     

07 Jun, 2014

2 commits


07 May, 2014

2 commits


13 Sep, 2013

1 commit


12 Sep, 2013

1 commit

  • It seems pretty unlikely that AFFS supports files over 4GB but we may as
    well leave use loff_t just for cleanness sake instead of truncating it to
    32 bits.

    Signed-off-by: Dan Carpenter
    Cc: Marco Stornelli
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

21 Dec, 2012

1 commit


21 Jul, 2011

1 commit

  • Btrfs needs to be able to control how filemap_write_and_wait_range() is called
    in fsync to make it less of a painful operation, so push down taking i_mutex and
    the calling of filemap_write_and_wait() down into the ->fsync() handlers. Some
    file systems can drop taking the i_mutex altogether it seems, like ext3 and
    ocfs2. For correctness sake I just pushed everything down in all cases to make
    sure that we keep the current behavior the same for everybody, and then each
    individual fs maintainer can make up their mind about what to do from there.
    Thanks,

    Acked-by: Jan Kara
    Signed-off-by: Josef Bacik
    Signed-off-by: Al Viro

    Josef Bacik
     

10 Mar, 2011

1 commit

  • Code has been converted over to the new explicit on-stack plugging,
    and delay users have been converted to use the new API for that.
    So lets kill off the old plugging along with aops->sync_page().

    Signed-off-by: Jens Axboe

    Jens Axboe
     

26 Oct, 2010

1 commit


10 Aug, 2010

1 commit