diff options
Diffstat (limited to 'kernel/fs/coda')
-rw-r--r-- | kernel/fs/coda/coda_linux.h | 2 | ||||
-rw-r--r-- | kernel/fs/coda/upcall.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/kernel/fs/coda/coda_linux.h b/kernel/fs/coda/coda_linux.h index d6f7a76a1..f829fe963 100644 --- a/kernel/fs/coda/coda_linux.h +++ b/kernel/fs/coda/coda_linux.h @@ -79,7 +79,7 @@ void coda_sysctl_clean(void); static inline struct coda_inode_info *ITOC(struct inode *inode) { - return list_entry(inode, struct coda_inode_info, vfs_inode); + return container_of(inode, struct coda_inode_info, vfs_inode); } static __inline__ struct CodaFid *coda_i2f(struct inode *inode) diff --git a/kernel/fs/coda/upcall.c b/kernel/fs/coda/upcall.c index 9b1ffaa05..f6c6c8adb 100644 --- a/kernel/fs/coda/upcall.c +++ b/kernel/fs/coda/upcall.c @@ -353,7 +353,7 @@ int venus_readlink(struct super_block *sb, struct CodaFid *fid, char *result; insize = max_t(unsigned int, - INSIZE(readlink), OUTSIZE(readlink)+ *length + 1); + INSIZE(readlink), OUTSIZE(readlink)+ *length); UPARG(CODA_READLINK); inp->coda_readlink.VFid = *fid; @@ -361,8 +361,8 @@ int venus_readlink(struct super_block *sb, struct CodaFid *fid, error = coda_upcall(coda_vcp(sb), insize, &outsize, inp); if (!error) { retlen = outp->coda_readlink.count; - if ( retlen > *length ) - retlen = *length; + if (retlen >= *length) + retlen = *length - 1; *length = retlen; result = (char *)outp + (long)outp->coda_readlink.data; memcpy(buffer, result, retlen); |