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