31 Dec, 2005

1 commit

  • The old /proc interfaces were never updated to use loff_t, and are just
    generally broken. Now, we should be using the seq_file interface for
    all of the proc files, but converting the legacy functions is more work
    than most people care for and has little upside..

    But at least we can make the non-LFS rules explicit, rather than just
    insanely wrapping the offset or something.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

30 Dec, 2005

2 commits


23 Dec, 2005

2 commits


21 Dec, 2005

2 commits

  • There's currently a diagnostic printk in relay_switch_subbuf() meant as
    a warning if you accidentally try to log an event larger than the
    sub-buffer size.

    The problem is if this happens while logging from somewhere it's not
    safe to be doing printks, such as in the scheduler, you can end up with
    a deadlock. This patch removes the warning from relay_switch_subbuf()
    and instead prints some diagnostic info when the channel is closed.

    Thanks to Mathieu Desnoyers for pointing out the problem and
    suggesting a fix.

    Signed-off-by: Tom Zanussi
    Signed-off-by: Linus Torvalds

    Tom Zanussi
     
  • We must check for MAY_SATTR before setting acls, which includes checking
    for read-only exports: the lower-level setxattr operation that
    eventually sets the acl cannot check export-level restrictions.

    Bug reported by Martin Walter .

    Signed-off-by: Andreas Gruenbacher
    Acked-by: Trond Myklebust
    Signed-off-by: Linus Torvalds

    Andreas Gruenbacher
     

20 Dec, 2005

2 commits


16 Dec, 2005

1 commit


15 Dec, 2005

2 commits

  • The following patch fixes a bug where if the journal is aborted, it can
    leave a transaction open. The result will be a BUG when another code
    path attempts to start a transaction and will get a "nesting into
    different fs" error, since current->journal_info will be left non-NULL.

    Original fix against SUSE kernel by Chris Mason

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • This should have been part of the original io error patch, but got
    dropped somewhere along the way.

    It's extremely important when handling the i/o error in the journal to
    not commit the transaction with corrupt data. This patch adds that code
    back in.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     

13 Dec, 2005

2 commits

  • The below patch lets userspace have more control over the inodes that
    inotify will watch. It introduces two new flags.

    IN_ONLYDIR -- only watch the inode if it is a directory.
    This is needed to avoid the race that can occur when we want to be
    sure that we are watching a directory.

    IN_DONT_FOLLOW -- don't follow a symlink. In combination
    with IN_ONLYDIR we can make sure that we don't watch the target of
    symlinks.

    The issues the flags fix came up when writing the gnome-vfs inotify
    backend. Default behaviour is unchanged.

    Signed-off-by: John McCutchan
    Acked-by: Robert Love
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    John McCutchan
     
  • Commit f549d6c18c0e8e6cf1bf0e7a47acc1daf7e2cec1 introduced a generic
    fallback for security xattrs, but appears to include a subtle bug.

    Gentoo users with kernels with selinux compiled in, and coreutils compiled
    with acl support, noticed that they could not copy files on tmpfs using
    'cp'.

    cp (compiled with acl support) copies the file, lists the extended
    attributes on the old file, copies them all to the new file, and then
    exits. However the listxattr() calls were failing with this odd behaviour:

    llistxattr("a.out", (nil), 0) = 17
    llistxattr("a.out", 0x7fffff8c6cb0, 17) = -1 ERANGE (Numerical result out of
    range)

    I believe this is a simple problem in the logic used to check the buffer
    sizes; if the user sends a buffer the exact size of the data, then its ok
    :)

    This change solves the problem.
    More info can be found at http://bugs.gentoo.org/113138

    Signed-off-by: Daniel Drake
    Acked-by: James Morris
    Acked-by: Stephen Smalley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Drake
     

04 Dec, 2005

5 commits

  • - Missing initialisation of attribute bitmask in _nfs4_proc_write()
    - On success, _nfs4_proc_write() must return number of bytes written.
    - Missing post_op_update_inode() in _nfs4_proc_write()
    - Missing initialisation of attribute bitmask in _nfs4_proc_commit()
    - Missing post_op_update_inode() in _nfs4_proc_commit()

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • - Missing nfs_mark_for_revalidate in nfs_proc_link()
    - Missing nfs_mark_for_revalidate in nfs_rename()

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Ensure that we use set_page_writeback() in the appropriate places
    to help the VM in keeping its page radix_tree in sync.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Steve Dickson writes:
    Doing the following:
    1. On server:
    $ mkdir ~/t
    $ echo Hello > ~/t/tmp

    2. On client, wait for a string to appear in this file:
    $ until grep -q foo t/tmp ; do echo -n . ; sleep 1 ; done

    3. On server, create a *new* file with the same name containing that
    string:
    $ mv ~/t/tmp ~/t/tmp.old; echo foo > ~/t/tmp

    will show how the client will never (and I mean never ;-) ) see
    the updated file.

    The problem is that we do not update nfsi->cache_change_attribute when the
    file changes on the server (we only update it when our client makes the
    changes). This again means that functions like nfs_check_verifier() will
    fail to register when the parent directory has changed and should trigger
    a dentry lookup revalidation.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Make sure cache_change_attribute is initialized to jiffies
    so when the mtime changes on directory, the directory
    will be refreshed.

    Signed-off by: Steve Dickson
    Signed-off-by: Trond Myklebust

    Steve Dickson
     

30 Nov, 2005

8 commits


29 Nov, 2005

9 commits

  • JFFS2 initialize f->sem mutex as "locked" in the slab constructor which is a
    bug. Objects are freed with unlocked f->sem mutex. So, when they allocated
    again, f->sem is unlocked because the slab cache constructor is not called for
    them. The constructor is called only once when memory pages are allocated for
    objects (namely, when the slab layer allocates new slabs). So, sometimes
    'struct jffs2_inode_info' are allocated with unlocked f->sem, sometimes with
    locked. This is a bug. Instead, initialize f->sem as unlocked in the
    constructor. I.e., in the "constructed" state f->sem must be unlocked.

    From: Keijiro Yano
    Acked-by: Artem B. Bityutskiy
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Check for invalid node ID values in the new atomic create+open method.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Check the created directory inode for aliases in the mkdir() method.

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • When quota file specified in mount options did not exist, we tried to
    dereference NULL pointer later. Fix it.

    Signed-off-by: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • Assign the appropriate dentry operations to the dentry. Fixes memory leak.

    Signed-off-by: Latchesar Ionkov
    Cc: Eric Van Hensbergen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Latchesar Ionkov
     
  • This patch corrects the return value for the EXT3_IOC_GROUP_ADD in case it
    fails due to the presence of multiple resizers at the filesystem.

    The problem is a little bit more serious than a wrong return value in this
    case, since the clause err=0 in the exit_journal path will lead to a call
    to update_backups which in turns causes a NULL pointer dereference.

    Signed-off-by: Glauber de Oliveira Costa
    Cc: "Stephen C. Tweedie"
    Cc: Andreas Dilger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Glauber de Oliveira Costa
     
  • I now see another overflow in reiserfs that should lead to data corruptions
    with files that are bigger than 4G under certain circumstances when using
    mmap.

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

    Oleg Drokin
     
  • This replaces the (in my opinion horrible) VM_UNMAPPED logic with very
    explicit support for a "remapped page range" aka VM_PFNMAP. It allows a
    VM area to contain an arbitrary range of page table entries that the VM
    never touches, and never considers to be normal pages.

    Any user of "remap_pfn_range()" automatically gets this new
    functionality, and doesn't even have to mark the pages reserved or
    indeed mark them any other way. It just works. As a side effect, doing
    mmap() on /dev/mem works for arbitrary ranges.

    Sparc update from David in the next commit.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • fix cifs negative dentries so they are freed faster (not requiring
    umount or readdir e.g.) so the client recognizes the new file on
    the server more quickly.

    Signed-off-by: Steve French

    Steve French
     

26 Nov, 2005

3 commits


25 Nov, 2005

1 commit