cifs: Allow passwords which begin with a delimitor
[deliverable/linux.git] / fs / ntfs / inode.c
index 1d27331e6fc945ee1ddba591d47ddf1ef1bafbd1..d3e118cc6ffa8f0016c5eb93e246aded38a1cc14 100644 (file)
@@ -2866,9 +2866,11 @@ conv_err_out:
  *
  * See ntfs_truncate() description above for details.
  */
+#ifdef NTFS_RW
 void ntfs_truncate_vfs(struct inode *vi) {
        ntfs_truncate(vi);
 }
+#endif
 
 /**
  * ntfs_setattr - called from notify_change() when an attribute is being changed
@@ -2914,8 +2916,10 @@ int ntfs_setattr(struct dentry *dentry, struct iattr *attr)
                                                NInoCompressed(ni) ?
                                                "compressed" : "encrypted");
                                err = -EOPNOTSUPP;
-                       } else
-                               err = vmtruncate(vi, attr->ia_size);
+                       } else {
+                               truncate_setsize(vi, attr->ia_size);
+                               ntfs_truncate_vfs(vi);
+                       }
                        if (err || ia_valid == ATTR_SIZE)
                                goto out;
                } else {
This page took 0.025413 seconds and 5 git commands to generate.