Skip to contentSkip to conversation

hostfs: drop vmtruncate

PATCH Superseded Marco Stornelli 1 participant 1 message Aug 31, 2012

Subsystems (2)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 14/21 hostfs: drop vmtruncate

Removed vmtruncate.

---
 fs/hostfs/hostfs_kern.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
fs/hostfs/hostfs_kern.c +5 -3
index 1241465..36f5a62 100644
@@ -848,9 +848,11 @@ int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
 	    attr->ia_size != i_size_read(inode)) {
 		int error;
 
-		error = vmtruncate(inode, attr->ia_size);
-		if (err)
-			return err;
+		error = inode_newsize_ok(inode, attr->ia_size);
+		if (error)
+			return error;
+
+		truncate_setsize(inode, attr->ia_size);
 	}
 
 	setattr_copy(inode, attr);
Signature · 1 line
1.7.3.4