X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Fdcache.c;h=265e0ce9769c70db65d5f9df11c4365f44c6dd29;hb=cf8bf7cd13804fcb87b5f9ad026d5b823873e8cc;hp=cb4a10690868263cb58e28012ee8f9abc4880da5;hpb=ac26663572db5b64522b92f3941a58678a832a36;p=~andy%2Flinux diff --git a/fs/dcache.c b/fs/dcache.c index cb4a1069086..265e0ce9769 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -3116,26 +3116,28 @@ char *simple_dname(struct dentry *dentry, char *buffer, int buflen) /* * Write full pathname from the root of the filesystem into the buffer. */ -static char *__dentry_path(struct dentry *dentry, char *buf, int buflen) +static char *__dentry_path(struct dentry *d, char *buf, int buflen) { + struct dentry *dentry; char *end, *retval; int len, seq = 0; int error = 0; + if (buflen < 2) + goto Elong; + rcu_read_lock(); restart: + dentry = d; end = buf + buflen; len = buflen; prepend(&end, &len, "\0", 1); - if (buflen < 1) - goto Elong; /* Get '/' right */ retval = end-1; *retval = '/'; read_seqbegin_or_lock(&rename_lock, &seq); while (!IS_ROOT(dentry)) { struct dentry *parent = dentry->d_parent; - int error; prefetch(parent); error = prepend_name(&end, &len, &dentry->d_name);