- Update to 3.3-final.
authorJeff Mahoney <jeffm@suse.com>
Mon, 19 Mar 2012 05:27:04 +0000 (01:27 -0400)
committerJeff Mahoney <jeffm@suse.com>
Mon, 19 Mar 2012 05:27:04 +0000 (01:27 -0400)
suse-commit: a9ab64aebbe2d78e7caa24e67d61943e6e44d3e1

1  2 
Makefile
drivers/gpu/drm/i915/intel_display.c
fs/block_dev.c
fs/namei.c

diff --combined Makefile
+++ b/Makefile
@@@ -1,7 -1,7 +1,7 @@@
  VERSION = 3
  PATCHLEVEL = 3
  SUBLEVEL = 0
- EXTRAVERSION = -rc7
+ EXTRAVERSION =
  NAME = Saber-toothed Squirrel
  
  # *DOCUMENTATION*
@@@ -65,20 -65,6 +65,20 @@@ ifndef KBUILD_CHECKSR
    KBUILD_CHECKSRC = 0
  endif
  
 +# Call message checker as part of the C compilation
 +#
 +# Use 'make D=1' to enable checking
 +# Use 'make D=2' to create the message catalog
 +
 +ifdef D
 +  ifeq ("$(origin D)", "command line")
 +    KBUILD_KMSG_CHECK = $(D)
 +  endif
 +endif
 +ifndef KBUILD_KMSG_CHECK
 +  KBUILD_KMSG_CHECK = 0
 +endif
 +
  # Use make M=dir to specify directory of external module to build
  # Old syntax make ... SUBDIRS=$PWD is still supported
  # Setting the environment variable KBUILD_EXTMOD take precedence
@@@ -361,7 -347,6 +361,7 @@@ CHECK              = spars
  
  CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
                  -Wbitwise -Wno-return-void $(CF)
 +KMSG_CHECK    = $(srctree)/scripts/kmsg-doc
  CFLAGS_MODULE   =
  AFLAGS_MODULE   =
  LDFLAGS_MODULE  =
@@@ -391,11 -376,6 +391,11 @@@ KBUILD_AFLAGS_MODULE  := -DMODUL
  KBUILD_CFLAGS_MODULE  := -DMODULE
  KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
  
 +# Warn about unsupported modules in kernels built inside Autobuild
 +ifneq ($(wildcard /.buildenv),)
 +CFLAGS                += -DUNSUPPORTED_MODULES=2
 +endif
 +
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
@@@ -412,7 -392,6 +412,7 @@@ export KBUILD_AFLAGS AFLAGS_KERNEL AFLA
  export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
  export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
  export KBUILD_ARFLAGS
 +export KBUILD_KMSG_CHECK KMSG_CHECK
  
  # When compiling out-of-tree modules, put MODVERDIR in the module
  # tree rather than in the kernel tree. The kernel tree might
@@@ -613,11 -592,6 +613,11 @@@ KBUILD_CFLAGS    += -fomit-frame-pointe
  endif
  endif
  
 +ifdef CONFIG_UNWIND_INFO
 +KBUILD_CFLAGS += -fasynchronous-unwind-tables
 +LDFLAGS_vmlinux       += --eh-frame-hdr
 +endif
 +
  ifdef CONFIG_DEBUG_INFO
  KBUILD_CFLAGS += -g
  KBUILD_AFLAGS += -gdwarf-2
@@@ -1053,7 -1027,7 +1053,7 @@@ depend dep
  
  # ---------------------------------------------------------------------------
  # Firmware install
 -INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware
 +INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware/$(KERNELRELEASE)
  export INSTALL_FW_PATH
  
  PHONY += firmware_install
@@@ -7828,6 -7828,7 +7828,7 @@@ int intel_framebuffer_init(struct drm_d
        case DRM_FORMAT_RGB332:
        case DRM_FORMAT_RGB565:
        case DRM_FORMAT_XRGB8888:
+       case DRM_FORMAT_XBGR8888:
        case DRM_FORMAT_ARGB8888:
        case DRM_FORMAT_XRGB2101010:
        case DRM_FORMAT_ARGB2101010:
@@@ -8292,11 -8293,7 +8293,11 @@@ void gen6_update_ring_freq(struct drm_i
         * over
         */
        if (!max_ia_freq)
 +#ifndef CONFIG_XEN
                max_ia_freq = tsc_khz;
 +#else
 +              max_ia_freq = cpu_khz;
 +#endif
  
        /* Convert from kHz to MHz */
        max_ia_freq /= 1000;
diff --combined fs/block_dev.c
@@@ -109,7 -109,7 +109,7 @@@ void invalidate_bdev(struct block_devic
        /* 99% of the time, we don't need to flush the cleancache on the bdev.
         * But, for the strange corners, lets be cautious
         */
 -      cleancache_flush_inode(mapping);
 +      cleancache_invalidate_inode(mapping);
  }
  EXPORT_SYMBOL(invalidate_bdev);
  
@@@ -1183,8 -1183,12 +1183,12 @@@ static int __blkdev_get(struct block_de
                         * The latter is necessary to prevent ghost
                         * partitions on a removed medium.
                         */
-                       if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM))
-                               rescan_partitions(disk, bdev);
+                       if (bdev->bd_invalidated) {
+                               if (!ret)
+                                       rescan_partitions(disk, bdev);
+                               else if (ret == -ENOMEDIUM)
+                                       invalidate_partitions(disk, bdev);
+                       }
                        if (ret)
                                goto out_clear;
                } else {
                        if (bdev->bd_disk->fops->open)
                                ret = bdev->bd_disk->fops->open(bdev, mode);
                        /* the same as first opener case, read comment there */
-                       if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM))
-                               rescan_partitions(bdev->bd_disk, bdev);
+                       if (bdev->bd_invalidated) {
+                               if (!ret)
+                                       rescan_partitions(bdev->bd_disk, bdev);
+                               else if (ret == -ENOMEDIUM)
+                                       invalidate_partitions(bdev->bd_disk, bdev);
+                       }
                        if (ret)
                                goto out_unlock_bdev;
                }
diff --combined fs/namei.c
@@@ -1892,26 -1892,6 +1892,26 @@@ other_userns
  }
  
  /*
 + * Do the directory specific tests of inode_permission() and call the
 + * may_delete inode operation.  The may_delete inode operation must do the
 + * sticky check when needed.
 + */
 +static int may_delete_iop(struct inode *dir, struct inode *inode, int replace)
 +{
 +      int error;
 +
 +      if (IS_RDONLY(dir))
 +              return -EROFS;
 +      if (IS_IMMUTABLE(dir))
 +              return -EACCES;
 +      error = dir->i_op->may_delete(dir, inode, replace);
 +      if (!error)
 +              error = security_inode_permission(dir, MAY_WRITE | MAY_EXEC);
 +
 +      return error;
 +}
 +
 +/*
   *    Check whether we can remove a link victim from directory dir, check
   *  whether the type of victim is right.
   *  1. We can't do it if dir is read-only (done in permission())
   * 10. We don't allow removal of NFS sillyrenamed files; it's handled by
   *     nfs_async_unlink().
   */
 -static int may_delete(struct inode *dir,struct dentry *victim,int isdir)
 +static int may_delete(struct inode *dir, struct dentry *victim,
 +                    int isdir, int replace)
  {
        int error;
  
  
        BUG_ON(victim->d_parent->d_inode != dir);
        audit_inode_child(victim, dir);
 -
 -      error = inode_permission(dir, MAY_WRITE | MAY_EXEC);
 +      if (dir->i_op->may_delete)
 +              error = may_delete_iop(dir, victim->d_inode, replace);
 +      else {
 +              error = inode_permission(dir, MAY_WRITE | MAY_EXEC);
 +              if (!error && check_sticky(dir, victim->d_inode))
 +                      error = -EPERM;
 +      }
        if (error)
                return error;
        if (IS_APPEND(dir))
                return -EPERM;
 -      if (check_sticky(dir, victim->d_inode)||IS_APPEND(victim->d_inode)||
 -          IS_IMMUTABLE(victim->d_inode) || IS_SWAPFILE(victim->d_inode))
 +      if (IS_APPEND(victim->d_inode) || IS_IMMUTABLE(victim->d_inode) ||
 +              IS_SWAPFILE(victim->d_inode))
                return -EPERM;
        if (isdir) {
                if (!S_ISDIR(victim->d_inode->i_mode))
        return 0;
  }
  
 +/*
 + * Do the directory specific tests of inode_permission() and call the
 + * may_create inode operation.
 + */
 +static int may_create_iop(struct inode *dir, int isdir)
 +{
 +      int error;
 +
 +      if (IS_RDONLY(dir))
 +              return -EROFS;
 +      if (IS_IMMUTABLE(dir))
 +              return -EACCES;
 +      error = dir->i_op->may_create(dir, isdir);
 +      if (!error)
 +              error = security_inode_permission(dir, MAY_WRITE | MAY_EXEC);
 +
 +      return error;
 +}
 +
  /*    Check whether we can create an object with dentry child in directory
   *  dir.
   *  1. We can't do it if child already exists (open has special treatment for
   *  3. We should have write and exec permissions on dir
   *  4. We can't do it if dir is immutable (done in permission())
   */
 -static inline int may_create(struct inode *dir, struct dentry *child)
 +static inline int may_create(struct inode *dir, struct dentry *child, int isdir)
  {
        if (child->d_inode)
                return -EEXIST;
        if (IS_DEADDIR(dir))
                return -ENOENT;
 -      return inode_permission(dir, MAY_WRITE | MAY_EXEC);
 +      if (dir->i_op->may_create)
 +              return may_create_iop(dir, isdir);
 +      else
 +              return inode_permission(dir, MAY_WRITE | MAY_EXEC);
  }
  
  /*
@@@ -2052,7 -2004,7 +2052,7 @@@ void unlock_rename(struct dentry *p1, s
  int vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
                struct nameidata *nd)
  {
 -      int error = may_create(dir, dentry);
 +      int error = may_create(dir, dentry, 0);
  
        if (error)
                return error;
@@@ -2210,7 -2162,7 +2210,7 @@@ static struct file *do_last(struct name
                /* sayonara */
                error = complete_walk(nd);
                if (error)
-                       return ERR_PTR(-ECHILD);
+                       return ERR_PTR(error);
  
                error = -ENOTDIR;
                if (nd->flags & LOOKUP_DIRECTORY) {
        /* Negative dentry, just create the file */
        if (!dentry->d_inode) {
                umode_t mode = op->mode;
 -              if (!IS_POSIXACL(dir->d_inode))
 +              if (!IS_ACL(dir->d_inode))
                        mode &= ~current_umask();
                /*
                 * This write is needed to ensure that a
        /* Why this, you ask?  _Now_ we might have grown LOOKUP_JUMPED... */
        error = complete_walk(nd);
        if (error)
-               goto exit;
+               return ERR_PTR(error);
        error = -EISDIR;
        if (S_ISDIR(nd->inode->i_mode))
                goto exit;
@@@ -2519,7 -2471,7 +2519,7 @@@ EXPORT_SYMBOL(user_path_create)
  
  int vfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
  {
 -      int error = may_create(dir, dentry);
 +      int error = may_create(dir, dentry, 0);
  
        if (error)
                return error;
@@@ -2576,7 -2528,7 +2576,7 @@@ SYSCALL_DEFINE4(mknodat, int, dfd, cons
        if (IS_ERR(dentry))
                return PTR_ERR(dentry);
  
 -      if (!IS_POSIXACL(path.dentry->d_inode))
 +      if (!IS_ACL(path.dentry->d_inode))
                mode &= ~current_umask();
        error = may_mknod(mode);
        if (error)
@@@ -2616,7 -2568,7 +2616,7 @@@ SYSCALL_DEFINE3(mknod, const char __use
  
  int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
  {
 -      int error = may_create(dir, dentry);
 +      int error = may_create(dir, dentry, 1);
  
        if (error)
                return error;
@@@ -2645,7 -2597,7 +2645,7 @@@ SYSCALL_DEFINE3(mkdirat, int, dfd, cons
        if (IS_ERR(dentry))
                return PTR_ERR(dentry);
  
 -      if (!IS_POSIXACL(path.dentry->d_inode))
 +      if (!IS_ACL(path.dentry->d_inode))
                mode &= ~current_umask();
        error = mnt_want_write(path.mnt);
        if (error)
@@@ -2694,7 -2646,7 +2694,7 @@@ void dentry_unhash(struct dentry *dentr
  
  int vfs_rmdir(struct inode *dir, struct dentry *dentry)
  {
 -      int error = may_delete(dir, dentry, 1);
 +      int error = may_delete(dir, dentry, 1, 0);
  
        if (error)
                return error;
@@@ -2789,7 -2741,7 +2789,7 @@@ SYSCALL_DEFINE1(rmdir, const char __use
  
  int vfs_unlink(struct inode *dir, struct dentry *dentry)
  {
 -      int error = may_delete(dir, dentry, 0);
 +      int error = may_delete(dir, dentry, 0, 0);
  
        if (error)
                return error;
@@@ -2898,7 -2850,7 +2898,7 @@@ SYSCALL_DEFINE1(unlink, const char __us
  
  int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname)
  {
 -      int error = may_create(dir, dentry);
 +      int error = may_create(dir, dentry, 0);
  
        if (error)
                return error;
@@@ -2964,7 -2916,7 +2964,7 @@@ int vfs_link(struct dentry *old_dentry
        if (!inode)
                return -ENOENT;
  
 -      error = may_create(dir, new_dentry);
 +      error = may_create(dir, new_dentry, S_ISDIR(inode->i_mode));
        if (error)
                return error;
  
@@@ -3184,14 -3136,14 +3184,14 @@@ int vfs_rename(struct inode *old_dir, s
        if (old_dentry->d_inode == new_dentry->d_inode)
                return 0;
   
 -      error = may_delete(old_dir, old_dentry, is_dir);
 +      error = may_delete(old_dir, old_dentry, is_dir, 0);
        if (error)
                return error;
  
        if (!new_dentry->d_inode)
 -              error = may_create(new_dir, new_dentry);
 +              error = may_create(new_dir, new_dentry, is_dir);
        else
 -              error = may_delete(new_dir, new_dentry, is_dir);
 +              error = may_delete(new_dir, new_dentry, is_dir, 1);
        if (error)
                return error;