]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 18:27:28 +0000 (10:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 18:27:28 +0000 (10:27 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (41 commits)
  fs: add documentation on fallocate hole punching
  Gfs2: fail if we try to use hole punch
  Btrfs: fail if we try to use hole punch
  Ext4: fail if we try to use hole punch
  Ocfs2: handle hole punching via fallocate properly
  XFS: handle hole punching via fallocate properly
  fs: add hole punching to fallocate
  vfs: pass struct file to do_truncate on O_TRUNC opens (try #2)
  fix signedness mess in rw_verify_area() on 64bit architectures
  fs: fix kernel-doc for dcache::prepend_path
  fs: fix kernel-doc for dcache::d_validate
  sanitize ecryptfs ->mount()
  switch afs
  move internal-only parts of ncpfs headers to fs/ncpfs
  switch ncpfs
  switch 9p
  pass default dentry_operations to mount_pseudo()
  switch hostfs
  switch affs
  switch configfs
  ...

1  2 
fs/anon_inodes.c
fs/coda/inode.c
fs/ext4/extents.c
fs/pipe.c

diff --combined fs/anon_inodes.c
index 98edb657b84d46abfa5cd319fb189f320034993d,549a53cc028355fd2e07fedc6e051f1c4f99a27e..cbe57f3c4d891033d3d8aaa120a87cb5f9e0a87e
@@@ -26,12 -26,6 +26,6 @@@ static struct vfsmount *anon_inode_mnt 
  static struct inode *anon_inode_inode;
  static const struct file_operations anon_inode_fops;
  
- static struct dentry *anon_inodefs_mount(struct file_system_type *fs_type,
-                               int flags, const char *dev_name, void *data)
- {
-       return mount_pseudo(fs_type, "anon_inode:", NULL, ANON_INODE_FS_MAGIC);
- }
  /*
   * anon_inodefs_dname() is called from d_path().
   */
@@@ -41,14 -35,22 +35,22 @@@ static char *anon_inodefs_dname(struct 
                                dentry->d_name.name);
  }
  
+ static const struct dentry_operations anon_inodefs_dentry_operations = {
+       .d_dname        = anon_inodefs_dname,
+ };
+ static struct dentry *anon_inodefs_mount(struct file_system_type *fs_type,
+                               int flags, const char *dev_name, void *data)
+ {
+       return mount_pseudo(fs_type, "anon_inode:", NULL,
+                       &anon_inodefs_dentry_operations, ANON_INODE_FS_MAGIC);
+ }
  static struct file_system_type anon_inode_fs_type = {
        .name           = "anon_inodefs",
        .mount          = anon_inodefs_mount,
        .kill_sb        = kill_anon_super,
  };
- static const struct dentry_operations anon_inodefs_dentry_operations = {
-       .d_dname        = anon_inodefs_dname,
- };
  
  /*
   * nop .set_page_dirty method so that people can use .page_mkwrite on
@@@ -64,9 -66,9 +66,9 @@@ static const struct address_space_opera
  };
  
  /**
 - * anon_inode_getfd - creates a new file instance by hooking it up to an
 - *                    anonymous inode, and a dentry that describe the "class"
 - *                    of the file
 + * anon_inode_getfile - creates a new file instance by hooking it up to an
 + *                      anonymous inode, and a dentry that describe the "class"
 + *                      of the file
   *
   * @name:    [in]    name of the "class" of the new file
   * @fops:    [in]    file operations for the new file
@@@ -113,7 -115,6 +115,6 @@@ struct file *anon_inode_getfile(const c
         */
        ihold(anon_inode_inode);
  
-       d_set_d_op(path.dentry, &anon_inodefs_dentry_operations);
        d_instantiate(path.dentry, anon_inode_inode);
  
        error = -ENFILE;
diff --combined fs/coda/inode.c
index f065a5d31a1964bc54a460048a7dc32aa2932af6,261d86f9caec1e35924a1febc664ded0a1a8148e..871b27715465fb6c21d408354b478a9a0a318a87
  #include <linux/vmalloc.h>
  
  #include <linux/coda.h>
- #include <linux/coda_linux.h>
  #include <linux/coda_psdev.h>
- #include <linux/coda_fs_i.h>
- #include <linux/coda_cache.h>
+ #include "coda_linux.h"
+ #include "coda_cache.h"
  
  #include "coda_int.h"
  
@@@ -45,7 -44,7 +44,7 @@@ static struct kmem_cache * coda_inode_c
  static struct inode *coda_alloc_inode(struct super_block *sb)
  {
        struct coda_inode_info *ei;
 -      ei = (struct coda_inode_info *)kmem_cache_alloc(coda_inode_cachep, GFP_KERNEL);
 +      ei = kmem_cache_alloc(coda_inode_cachep, GFP_KERNEL);
        if (!ei)
                return NULL;
        memset(&ei->c_fid, 0, sizeof(struct CodaFid));
@@@ -193,6 -192,7 +192,7 @@@ static int coda_fill_super(struct super
        sb->s_blocksize_bits = 12;
        sb->s_magic = CODA_SUPER_MAGIC;
        sb->s_op = &coda_super_operations;
+       sb->s_d_op = &coda_dentry_operations;
        sb->s_bdi = &vc->bdi;
  
        /* get root fid from Venus: this needs the root inode */
diff --combined fs/ext4/extents.c
index d202d765dad28f9d6498c05a2c8d6b6554568e93,2e061dffb722e51bfcf75a479c57077dfd67b171..c4068f6abf03ce11ea653835ea22845aa3c0b2bf
@@@ -2845,14 -2845,14 +2845,14 @@@ fix_extent_len
   * to an uninitialized extent.
   *
   * Writing to an uninitized extent may result in splitting the uninitialized
 - * extent into multiple /intialized unintialized extents (up to three)
 + * extent into multiple /initialized uninitialized extents (up to three)
   * There are three possibilities:
   *   a> There is no split required: Entire extent should be uninitialized
   *   b> Splits in two extents: Write is happening at either end of the extent
   *   c> Splits in three extents: Somone is writing in middle of the extent
   *
   * One of more index blocks maybe needed if the extent tree grow after
 - * the unintialized extent split. To prevent ENOSPC occur at the IO
 + * the uninitialized extent split. To prevent ENOSPC occur at the IO
   * complete, we need to split the uninitialized extent before DIO submit
   * the IO. The uninitialized extent called at this time will be split
   * into three uninitialized extent(at most). After IO complete, the part
@@@ -3644,6 -3644,10 +3644,10 @@@ long ext4_fallocate(struct inode *inode
        struct ext4_map_blocks map;
        unsigned int credits, blkbits = inode->i_blkbits;
  
+       /* We only support the FALLOC_FL_KEEP_SIZE mode */
+       if (mode && (mode != FALLOC_FL_KEEP_SIZE))
+               return -EOPNOTSUPP;
        /*
         * currently supporting (pre)allocate mode for extent-based
         * files _only_
diff --combined fs/pipe.c
index 04151e2aee964e940c934c4db54e316181ebe88e,6b0255a74f36207c9010fbefe0057e779586ecc2..e2e95fb46a1e0a63e75cefe3518a833960bded60
+++ b/fs/pipe.c
@@@ -441,7 -441,7 +441,7 @@@ redo
                        break;
                }
                if (do_wakeup) {
 -                      wake_up_interruptible_sync(&pipe->wait);
 +                      wake_up_interruptible_sync_poll(&pipe->wait, POLLOUT);
                        kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT);
                }
                pipe_wait(pipe);
  
        /* Signal writers asynchronously that there is more room. */
        if (do_wakeup) {
 -              wake_up_interruptible_sync(&pipe->wait);
 +              wake_up_interruptible_sync_poll(&pipe->wait, POLLOUT);
                kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT);
        }
        if (ret > 0)
@@@ -612,7 -612,7 +612,7 @@@ redo2
                        break;
                }
                if (do_wakeup) {
 -                      wake_up_interruptible_sync(&pipe->wait);
 +                      wake_up_interruptible_sync_poll(&pipe->wait, POLLIN);
                        kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
                        do_wakeup = 0;
                }
  out:
        mutex_unlock(&inode->i_mutex);
        if (do_wakeup) {
 -              wake_up_interruptible_sync(&pipe->wait);
 +              wake_up_interruptible_sync_poll(&pipe->wait, POLLIN);
                kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
        }
        if (ret > 0)
@@@ -715,7 -715,7 +715,7 @@@ pipe_release(struct inode *inode, int d
        if (!pipe->readers && !pipe->writers) {
                free_pipe_info(inode);
        } else {
 -              wake_up_interruptible_sync(&pipe->wait);
 +              wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLOUT);
                kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN);
                kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT);
        }
@@@ -1004,7 -1004,6 +1004,6 @@@ struct file *create_write_pipe(int flag
                goto err_inode;
        path.mnt = mntget(pipe_mnt);
  
-       d_set_d_op(path.dentry, &pipefs_dentry_operations);
        d_instantiate(path.dentry, inode);
  
        err = -ENFILE;
@@@ -1266,7 -1265,8 +1265,8 @@@ static const struct super_operations pi
  static struct dentry *pipefs_mount(struct file_system_type *fs_type,
                         int flags, const char *dev_name, void *data)
  {
-       return mount_pseudo(fs_type, "pipe:", &pipefs_ops, PIPEFS_MAGIC);
+       return mount_pseudo(fs_type, "pipe:", &pipefs_ops,
+                       &pipefs_dentry_operations, PIPEFS_MAGIC);
  }
  
  static struct file_system_type pipe_fs_type = {