Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c55703d807a8c6c239a5fea7b9cd7da08c27d7a9
Commit:     c55703d807a8c6c239a5fea7b9cd7da08c27d7a9
Parent:     e2735b7720320b68590ca2b32b78ca91213931b2
Author:     Eric Van Hensbergen <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 6 19:25:08 2008 -0600
Committer:  Eric Van Hensbergen <[EMAIL PROTECTED]>
CommitDate: Wed Feb 6 19:25:08 2008 -0600

    9p: fix bug in attach-per-user
    
    When a new user attached at a directory other than the root, he would end
    up in the parent directory of the cwd.  This was due to a logic error in
    the code which attaches the user at the mount point and walks back to the
    cwd.  This patch fixes that.
    
    Signed-off-by: Eric Van Hensbergen <[EMAIL PROTECTED]>
---
 fs/9p/fid.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index b364da7..dfebdbe 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -175,7 +175,7 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry)
        if (!wnames)
                return ERR_PTR(-ENOMEM);
 
-       for (d = dentry, i = n; i >= 0; i--, d = d->d_parent)
+       for (d = dentry, i = (n-1); i >= 0; i--, d = d->d_parent)
                wnames[i] = (char *) d->d_name.name;
 
        clone = 1;
@@ -183,7 +183,7 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry)
        while (i < n) {
                l = min(n - i, P9_MAXWELEM);
                fid = p9_client_walk(fid, l, &wnames[i], clone);
-               if (!fid) {
+               if (IS_ERR(fid)) {
                        kfree(wnames);
                        return fid;
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to