X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fllite%2Fnamei.c;h=008ede57b8bce4b92e3c23127411349edf03911c;hb=8f13bc198125c03dcf79625b310a0f3ac76b00b2;hp=0d282115ebc4f8a748ffebe12644521e59074364;hpb=33d9f1456c652957e08bc99803b4d6eb96666bd1;p=fs%2Flustre-release.git diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 0d28211..008ede5 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -552,23 +552,23 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, struct lookup_intent *ll_convert_intent(struct open_intent *oit, int lookup_flags) { - struct lookup_intent *it; - - OBD_ALLOC(it, sizeof(*it)); - if (!it) - return ERR_PTR(-ENOMEM); - - if (lookup_flags & LOOKUP_OPEN) { - it->it_op = IT_OPEN; - if (lookup_flags & LOOKUP_CREATE) - it->it_op |= IT_CREAT; - it->it_create_mode = (oit->create_mode & S_IALLUGO) | S_IFREG; - it->it_flags = oit->flags; - } else { - it->it_op = IT_GETATTR; - } + struct lookup_intent *it; + + OBD_ALLOC(it, sizeof(*it)); + if (!it) + return ERR_PTR(-ENOMEM); + + if (lookup_flags & LOOKUP_OPEN) { + it->it_op = IT_OPEN; + if (lookup_flags & LOOKUP_CREATE) + it->it_op |= IT_CREAT; + it->it_create_mode = (oit->create_mode & S_IALLUGO) | S_IFREG; + it->it_flags = ll_namei_to_lookup_intent_flag(oit->flags); + } else { + it->it_op = IT_GETATTR; + } - return it; + return it; } static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry,