Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Oct 2011 17:31:42 +0000 (10:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Oct 2011 17:31:42 +0000 (10:31 -0700)
* 'for-linus' of git://oss.sgi.com/xfs/xfs: (69 commits)
  xfs: add AIL pushing tracepoints
  xfs: put in missed fix for merge problem
  xfs: do not flush data workqueues in xfs_flush_buftarg
  xfs: remove XFS_bflush
  xfs: remove xfs_buf_target_name
  xfs: use xfs_ioerror_alert in xfs_buf_iodone_callbacks
  xfs: clean up xfs_ioerror_alert
  xfs: clean up buffer allocation
  xfs: remove buffers from the delwri list in xfs_buf_stale
  xfs: remove XFS_BUF_STALE and XFS_BUF_SUPER_STALE
  xfs: remove XFS_BUF_SET_VTYPE and XFS_BUF_SET_VTYPE_REF
  xfs: remove XFS_BUF_FINISH_IOWAIT
  xfs: remove xfs_get_buftarg_list
  xfs: fix buffer flushing during unmount
  xfs: optimize fsync on directories
  xfs: reduce the number of log forces from tail pushing
  xfs: Don't allocate new buffers on every call to _xfs_buf_find
  xfs: simplify xfs_trans_ijoin* again
  xfs: unlock the inode before log force in xfs_change_file_space
  xfs: unlock the inode before log force in xfs_fs_nfs_commit_metadata
  ...

1  2 
fs/xfs/xfs_iops.c

diff --combined fs/xfs/xfs_iops.c
@@@ -102,38 -102,37 +102,38 @@@ xfs_mark_inode_dirty
  
  }
  
 +
 +int xfs_initxattrs(struct inode *inode, const struct xattr *xattr_array,
 +                 void *fs_info)
 +{
 +      const struct xattr *xattr;
 +      struct xfs_inode *ip = XFS_I(inode);
 +      int error = 0;
 +
 +      for (xattr = xattr_array; xattr->name != NULL; xattr++) {
 +              error = xfs_attr_set(ip, xattr->name, xattr->value,
 +                                   xattr->value_len, ATTR_SECURE);
 +              if (error < 0)
 +                      break;
 +      }
 +      return error;
 +}
 +
  /*
   * Hook in SELinux.  This is not quite correct yet, what we really need
   * here (as we do for default ACLs) is a mechanism by which creation of
   * these attrs can be journalled at inode creation time (along with the
   * inode, of course, such that log replay can't cause these to be lost).
   */
 +
  STATIC int
  xfs_init_security(
        struct inode    *inode,
        struct inode    *dir,
        const struct qstr *qstr)
  {
 -      struct xfs_inode *ip = XFS_I(inode);
 -      size_t          length;
 -      void            *value;
 -      unsigned char   *name;
 -      int             error;
 -
 -      error = security_inode_init_security(inode, dir, qstr, (char **)&name,
 -                                           &value, &length);
 -      if (error) {
 -              if (error == -EOPNOTSUPP)
 -                      return 0;
 -              return -error;
 -      }
 -
 -      error = xfs_attr_set(ip, name, value, length, ATTR_SECURE);
 -
 -      kfree(name);
 -      kfree(value);
 -      return error;
 +      return security_inode_init_security(inode, dir, qstr,
 +                                          &xfs_initxattrs, NULL);
  }
  
  static void
@@@ -466,7 -465,7 +466,7 @@@ xfs_vn_getattr
        trace_xfs_getattr(ip);
  
        if (XFS_FORCED_SHUTDOWN(mp))
-               return XFS_ERROR(EIO);
+               return -XFS_ERROR(EIO);
  
        stat->size = XFS_ISIZE(ip);
        stat->dev = inode->i_sb->s_dev;
@@@ -612,7 -611,7 +612,7 @@@ xfs_setattr_nonsize
                }
        }
  
-       xfs_trans_ijoin(tp, ip);
+       xfs_trans_ijoin(tp, ip, 0);
  
        /*
         * Change file ownership.  Must be the owner or privileged.
@@@ -834,16 -833,16 +834,16 @@@ xfs_setattr_size
         * care about here.
         */
        if (ip->i_size != ip->i_d.di_size && iattr->ia_size > ip->i_d.di_size) {
-               error = xfs_flush_pages(ip, ip->i_d.di_size, iattr->ia_size,
-                                       XBF_ASYNC, FI_NONE);
+               error = xfs_flush_pages(ip, ip->i_d.di_size, iattr->ia_size, 0,
+                                       FI_NONE);
                if (error)
                        goto out_unlock;
        }
  
        /*
-        * Wait for all I/O to complete.
+        * Wait for all direct I/O to complete.
         */
-       xfs_ioend_wait(ip);
+       inode_dio_wait(inode);
  
        error = -block_truncate_page(inode->i_mapping, iattr->ia_size,
                                     xfs_get_blocks);
  
        xfs_ilock(ip, XFS_ILOCK_EXCL);
  
-       xfs_trans_ijoin(tp, ip);
+       xfs_trans_ijoin(tp, ip, 0);
  
        /*
         * Only change the c/mtime if we are changing the size or we are