From aad5abdfd94be8bc58ca63f919e84e6c12567d23 Mon Sep 17 00:00:00 2001 From: ericm Date: Fri, 12 Sep 2003 16:56:02 +0000 Subject: [PATCH] [liblustre]: open(O_CREAT)/close() --- lustre/liblustre/namei.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lustre/liblustre/namei.c b/lustre/liblustre/namei.c index 295772e..d89e48c 100644 --- a/lustre/liblustre/namei.c +++ b/lustre/liblustre/namei.c @@ -395,7 +395,8 @@ static int lookup_it_finish(struct ptlrpc_request *request, int offset, /* NB 1 request reference will be taken away by ll_intent_lock() * when I return */ - if (!it_disposition(it, DISP_LOOKUP_NEG)) { + /* XXX libsysio require the inode must be generated here XXX */ + if ((it->it_op & IT_CREAT) || !it_disposition(it, DISP_LOOKUP_NEG)) { struct lustre_md md; struct llu_inode_info *lli; ENTRY; @@ -439,6 +440,8 @@ static int lookup_it_finish(struct ptlrpc_request *request, int offset, ENTRY; } + if (inode && (it->it_op & (IT_OPEN | IT_GETATTR))) + LL_SAVE_INTENT(inode, it); /* dentry->d_op = &ll_d_ops; ll_set_dd(dentry); -- 1.8.3.1