From: nikita Date: Tue, 24 Oct 2006 06:38:01 +0000 (+0000) Subject: lvfs: fsfilt_ext3_read(): return actually read size. X-Git-Tag: v1_8_0_110~486^2~367 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f88a3ad028dbe75b5715d535cc4c560321a1843d;p=fs%2Flustre-release.git lvfs: fsfilt_ext3_read(): return actually read size. --- diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index f0e18b8..1925b38 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -1123,7 +1123,7 @@ int fsfilt_ext3_read(struct inode *inode, void *buf, int size, loff_t *offs) { unsigned long block; struct buffer_head *bh; - int err, blocksize, csize, boffs; + int err, blocksize, csize, boffs, osize = size; /* prevent reading after eof */ lock_kernel(); @@ -1160,14 +1160,18 @@ int fsfilt_ext3_read(struct inode *inode, void *buf, int size, loff_t *offs) buf += csize; size -= csize; } - return 0; + return osize; } EXPORT_SYMBOL(fsfilt_ext3_read); static int fsfilt_ext3_read_record(struct file * file, void *buf, int size, loff_t *offs) { - return fsfilt_ext3_read(file->f_dentry->d_inode, buf, size, offs); + int rc; + rc = fsfilt_ext3_read(file->f_dentry->d_inode, buf, size, offs); + if (rc > 0) + rc = 0; + return rc; } int fsfilt_ext3_write_handle(struct inode *inode, void *buf, int bufsize,