From: nfshp Date: Fri, 4 Apr 2003 14:57:29 +0000 (+0000) Subject: another segfault fix X-Git-Tag: v1_7_100~1^94~27 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=48458267474638fd308354e40864d0d77e4482b5;p=fs%2Flustre-release.git another segfault fix --- diff --git a/lustre/liblustre/file.c b/lustre/liblustre/file.c index 15259a9..e99ebb8 100644 --- a/lustre/liblustre/file.c +++ b/lustre/liblustre/file.c @@ -378,6 +378,12 @@ int llu_iop_open(struct pnode *pnode, int flags, mode_t mode) return llu_file_open(pnode->p_base->pb_ino); } +int llu_iop_close(struct inode *inode) +{ + /* FIXME do proper cleanup here */ + return 0; +} + int llu_iop_ipreadv(struct inode *ino, struct io_arguments *ioargs, struct ioctx **ioctxp) diff --git a/lustre/liblustre/llite_lib.h b/lustre/liblustre/llite_lib.h index 561789a..e18dcad 100644 --- a/lustre/liblustre/llite_lib.h +++ b/lustre/liblustre/llite_lib.h @@ -102,6 +102,7 @@ extern struct fssw_ops llu_fssw_ops; /* file.c */ int llu_create(struct inode *dir, struct pnode_base *pnode, int mode); int llu_iop_open(struct pnode *pnode, int flags, mode_t mode); +int llu_iop_close(struct inode *inode); int llu_iop_ipreadv(struct inode *ino, struct io_arguments *ioargs, struct ioctx **ioctxp); @@ -113,5 +114,7 @@ int llu_iop_ipwritev(struct inode *ino, int llu_iop_iodone(struct ioctx *ioctxp __IS_UNUSED); ssize_t llu_file_write(struct inode *inode, const struct iovec *iovec, size_t iovlen, loff_t pos); +ssize_t llu_file_read(struct inode *inode, const struct iovec *iovec, + size_t iovlen, loff_t pos); #endif diff --git a/lustre/liblustre/lltest.c b/lustre/liblustre/lltest.c index f26e006..c9b0e34 100644 --- a/lustre/liblustre/lltest.c +++ b/lustre/liblustre/lltest.c @@ -105,7 +105,7 @@ main(int argc, char * const argv[]) } #endif #if 1 - fd = fixme_open("/newfile5", O_RDWR|O_CREAT|O_TRUNC, 00664); + fd = fixme_open("/newfile7", O_RDWR|O_CREAT|O_TRUNC, 00664); printf("***************** open return %d ****************\n", fd); memset(pgbuf, 'A', 4096); diff --git a/lustre/liblustre/super.c b/lustre/liblustre/super.c index 22969a9..20c7de7 100644 --- a/lustre/liblustre/super.c +++ b/lustre/liblustre/super.c @@ -325,6 +325,7 @@ static struct inode_ops llu_inode_ops = { inop_lookup: llu_iop_lookup, inop_getattr: llu_iop_getattr, inop_open: llu_iop_open, + inop_close: llu_iop_close, inop_ipreadv: llu_iop_ipreadv, inop_ipwritev: llu_iop_ipwritev, inop_iodone: llu_iop_iodone,