Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / fs / ocfs2 / file.c
index ed5d523..57e0d30 100644 (file)
@@ -1048,6 +1048,10 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)
        mlog_entry("(0x%p, '%.*s')\n", dentry,
                   dentry->d_name.len, dentry->d_name.name);
 
+       /* ensuring we don't even attempt to truncate a symlink */
+       if (S_ISLNK(inode->i_mode))
+               attr->ia_valid &= ~ATTR_SIZE;
+
        if (attr->ia_valid & ATTR_MODE)
                mlog(0, "mode change: %d\n", attr->ia_mode);
        if (attr->ia_valid & ATTR_UID)
@@ -2242,7 +2246,7 @@ const struct file_operations ocfs2_fops = {
        .open           = ocfs2_file_open,
        .aio_read       = ocfs2_file_aio_read,
        .aio_write      = ocfs2_file_aio_write,
-       .ioctl          = ocfs2_ioctl,
+       .unlocked_ioctl = ocfs2_ioctl,
 #ifdef CONFIG_COMPAT
        .compat_ioctl   = ocfs2_compat_ioctl,
 #endif
@@ -2258,7 +2262,7 @@ const struct file_operations ocfs2_dops = {
        .fsync          = ocfs2_sync_file,
        .release        = ocfs2_dir_release,
        .open           = ocfs2_dir_open,
-       .ioctl          = ocfs2_ioctl,
+       .unlocked_ioctl = ocfs2_ioctl,
 #ifdef CONFIG_COMPAT
        .compat_ioctl   = ocfs2_compat_ioctl,
 #endif