From bd1e45e71493a8a6d79064b06112274662c93964 Mon Sep 17 00:00:00 2001
From: "Michael I. Bushnell" <mib@gnu.org>
Date: Thu, 3 Feb 1994 20:34:16 +0000
Subject: Formerly io-seek.c.~2~

---
 libdiskfs/io-seek.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'libdiskfs/io-seek.c')

diff --git a/libdiskfs/io-seek.c b/libdiskfs/io-seek.c
index 89f797e1..f17bc04b 100644
--- a/libdiskfs/io-seek.c
+++ b/libdiskfs/io-seek.c
@@ -16,6 +16,7 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
 #include "priv.h"
+#include "io_S.h"
 
 #define diskfs_readonly 0
 
@@ -29,7 +30,8 @@ diskfs_S_io_seek (struct protid *cred,
   
   CHANGE_IP_FIELD (cred,
 		   ({
-		     if (!(err = ioserver_get_conch (&ip->i_conch)))
+		     err = ioserver_get_conch (&np->i_conch);
+		     if (!err)
 		       switch (whence)
 			 {
 			 case SEEK_SET:
@@ -39,7 +41,8 @@ diskfs_S_io_seek (struct protid *cred,
 			   cred->po->filepointer += offset;
 			   break;
 			 case SEEK_END:
-			   cred->po->filepointer = ip->di->di_size + offset;
+			   cred->po->filepointer = (np->dn_stat.st_size
+						    + offset);
 			   break;
 			 default:
 			   err = EINVAL;
-- 
cgit v1.2.3