From: adilger Date: Thu, 8 Sep 2005 18:16:22 +0000 (+0000) Subject: Branch b1_4 X-Git-Tag: 1.4.10~578 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=11cd2136a915e9eb3588588de0c163a595f2d41e;p=fs%2Flustre-release.git Branch b1_4 Description: liblustre could not open files whose last component is a symlink Details : sysio_path_walk() would incorrectly pass the open intent to intermediate path components. b=6363 r=oleg, lee, devesh --- diff --git a/libsysio/src/namei.c b/libsysio/src/namei.c index c4b6072..9dc7a15 100644 --- a/libsysio/src/namei.c +++ b/libsysio/src/namei.c @@ -257,12 +257,14 @@ _sysio_path_walk(struct pnode *parent, struct nameidata *nd) lpath[cc] = '\0'; /* NUL term */ /* * Handle symbolic links with recursion. Yuck! + * Pass the NULL intent for recursive symlink + * except the last component. */ ND_INIT(&nameidata, (nd->nd_flags | ND_NEGOK), lpath, nd->nd_root, - nd->nd_intent); + !next.len ? nd->nd_intent : NULL); nameidata.nd_slicnt = nd->nd_slicnt + 1; err = _sysio_path_walk(nd->nd_pno->p_parent, &nameidata);