[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/gfs-kernel/src/gfs ops_inode.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL51
Changes by:	rpeterso sourceware org	2007-07-11 22:15:22

Modified files:
	gfs-kernel/src/gfs: ops_inode.c 

Log message:
	Resolves: bz #241096: GFS: bug in gfs truncate

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_inode.c.diff?cvsroot=cluster&only_with_tag=RHEL51&r1=1.15.2.2&r2=1.15.2.2.2.1

--- cluster/gfs-kernel/src/gfs/ops_inode.c	2007/06/05 17:46:38	1.15.2.2
+++ cluster/gfs-kernel/src/gfs/ops_inode.c	2007/07/11 22:15:22	1.15.2.2.2.1
@@ -1393,8 +1393,11 @@
 		}
 
 		error = gfs_truncatei(ip, attr->ia_size, gfs_truncator_page);
-		if (error)
+		if (error) {
+			if (inode->i_size != ip->i_di.di_size)
+				i_size_write(inode, ip->i_di.di_size);
 			goto fail;
+		}
 
 		if ((sdp->sd_vfs->s_flags & MS_SYNCHRONOUS) &&
 		    !gfs_is_jdata(ip))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]