b=6243
r=adilger
Properly return 0 for reads that are totally after EOF.
- fix a collection of import/export refcount and cleanup ordering
issues for safer force cleanup (5949,4834)
- fix lfs to handle large numbers of targets (6223)
+ - Fix reads after EOF on files with no objects to return 0 (6264,6243)
2005-05-10 Cluster File Systems, Inc. <info@clusterfs.com>
* version 1.4.2
/* Since there are no objects on OSTs, we have nothing to get
* lock on and so we are forced to access inode->i_size
* unguarded */
+
+ /* Read beyond end of file */
+ if (*ppos >= inode->i_size)
+ RETURN(0);
+
if (count > inode->i_size - *ppos)
count = inode->i_size - *ppos;
/* Make sure to correctly adjust the file pos pointer for