Re: [PATCH 6/7] d_path: Make d_path() use a struct path (2nd try)
On 11/3/07, Jan Blunck <[EMAIL PROTECTED]> wrote: > d_path() is used on a pair. Lets use a struct path to > reflect this. > > Signed-off-by: Jan Blunck <[EMAIL PROTECTED]> > --- > arch/blackfin/kernel/traps.c | 12 +--- Thanks,Acked-by: Bryan Wu <[EMAIL PROTECTED]> > drivers/md/bitmap.c |8 +--- > drivers/usb/gadget/file_storage.c |8 +++- > fs/compat_ioctl.c |2 +- > fs/dcache.c | 12 +--- > fs/dcookies.c |2 +- > fs/ecryptfs/super.c |5 ++--- > fs/nfsd/export.c |3 ++- > fs/proc/base.c|2 +- > fs/seq_file.c |4 +++- > fs/sysfs/file.c |5 ++--- > fs/unionfs/super.c|3 +-- > include/linux/dcache.h|5 +++-- > kernel/audit.c|2 +- > 14 files changed, 31 insertions(+), 42 deletions(-) > > Index: b/arch/blackfin/kernel/traps.c > === > --- a/arch/blackfin/kernel/traps.c > +++ b/arch/blackfin/kernel/traps.c > @@ -98,15 +98,13 @@ static int printk_address(unsigned long > struct vm_area_struct *vma = vml->vma; > > if (address >= vma->vm_start && address < > vma->vm_end) { > + char _tmpbuf[256]; > char *name = p->comm; > struct file *file = vma->vm_file; > - if (file) { > - char _tmpbuf[256]; > - name = d_path(file->f_dentry, > - file->f_vfsmnt, > - _tmpbuf, > - sizeof(_tmpbuf)); > - } > + > + if (file) > + name = d_path(>f_path, _tmpbuf, > + sizeof(_tmpbuf)); > > /* FLAT does not have its text aligned to the > start of > * the map while FDPIC ELF does ... > Index: b/drivers/md/bitmap.c > === > --- a/drivers/md/bitmap.c > +++ b/drivers/md/bitmap.c > @@ -206,16 +206,10 @@ static void bitmap_checkfree(struct bitm > /* copy the pathname of a file to a buffer */ > char *file_path(struct file *file, char *buf, int count) > { > - struct dentry *d; > - struct vfsmount *v; > - > if (!buf) > return NULL; > > - d = file->f_path.dentry; > - v = file->f_path.mnt; > - > - buf = d_path(d, v, buf, count); > + buf = d_path(>f_path, buf, count); > > return IS_ERR(buf) ? NULL : buf; > } > Index: b/drivers/usb/gadget/file_storage.c > === > --- a/drivers/usb/gadget/file_storage.c > +++ b/drivers/usb/gadget/file_storage.c > @@ -3567,8 +3567,7 @@ static ssize_t show_file(struct device * > > down_read(>filesem); > if (backing_file_is_open(curlun)) { // Get the complete pathname > - p = d_path(curlun->filp->f_path.dentry, > - curlun->filp->f_path.mnt, buf, PAGE_SIZE - 1); > + p = d_path(>filp->f_path, buf, PAGE_SIZE - 1); > if (IS_ERR(p)) > rc = PTR_ERR(p); > else { > @@ -3985,9 +3984,8 @@ static int __init fsg_bind(struct usb_ga > if (backing_file_is_open(curlun)) { > p = NULL; > if (pathbuf) { > - p = d_path(curlun->filp->f_path.dentry, > - curlun->filp->f_path.mnt, > - pathbuf, PATH_MAX); > + p = d_path(>filp->f_path, > + pathbuf, PATH_MAX); > if (IS_ERR(p)) > p = NULL; > } > Index: b/fs/compat_ioctl.c > === > --- a/fs/compat_ioctl.c > +++ b/fs/compat_ioctl.c > @@ -3544,7 +3544,7 @@ static void compat_ioctl_error(struct fi > /* find the name of the device. */ > path = (char *)__get_free_page(GFP_KERNEL); > if (path) { > - fn = d_path(filp->f_path.dentry, filp->f_path.mnt, path, > PAGE_SIZE); > + fn = d_path(>f_path, path, PAGE_SIZE); > if (IS_ERR(fn)) > fn = "?"; > } > Index: b/fs/dcache.c >
[PATCH 6/7] d_path: Make d_path() use a struct path (2nd try)
d_path() is used on a pair. Lets use a struct path to reflect this. Signed-off-by: Jan Blunck <[EMAIL PROTECTED]> --- arch/blackfin/kernel/traps.c | 12 +--- drivers/md/bitmap.c |8 +--- drivers/usb/gadget/file_storage.c |8 +++- fs/compat_ioctl.c |2 +- fs/dcache.c | 12 +--- fs/dcookies.c |2 +- fs/ecryptfs/super.c |5 ++--- fs/nfsd/export.c |3 ++- fs/proc/base.c|2 +- fs/seq_file.c |4 +++- fs/sysfs/file.c |5 ++--- fs/unionfs/super.c|3 +-- include/linux/dcache.h|5 +++-- kernel/audit.c|2 +- 14 files changed, 31 insertions(+), 42 deletions(-) Index: b/arch/blackfin/kernel/traps.c === --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -98,15 +98,13 @@ static int printk_address(unsigned long struct vm_area_struct *vma = vml->vma; if (address >= vma->vm_start && address < vma->vm_end) { + char _tmpbuf[256]; char *name = p->comm; struct file *file = vma->vm_file; - if (file) { - char _tmpbuf[256]; - name = d_path(file->f_dentry, - file->f_vfsmnt, - _tmpbuf, - sizeof(_tmpbuf)); - } + + if (file) + name = d_path(>f_path, _tmpbuf, + sizeof(_tmpbuf)); /* FLAT does not have its text aligned to the start of * the map while FDPIC ELF does ... Index: b/drivers/md/bitmap.c === --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -206,16 +206,10 @@ static void bitmap_checkfree(struct bitm /* copy the pathname of a file to a buffer */ char *file_path(struct file *file, char *buf, int count) { - struct dentry *d; - struct vfsmount *v; - if (!buf) return NULL; - d = file->f_path.dentry; - v = file->f_path.mnt; - - buf = d_path(d, v, buf, count); + buf = d_path(>f_path, buf, count); return IS_ERR(buf) ? NULL : buf; } Index: b/drivers/usb/gadget/file_storage.c === --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -3567,8 +3567,7 @@ static ssize_t show_file(struct device * down_read(>filesem); if (backing_file_is_open(curlun)) { // Get the complete pathname - p = d_path(curlun->filp->f_path.dentry, - curlun->filp->f_path.mnt, buf, PAGE_SIZE - 1); + p = d_path(>filp->f_path, buf, PAGE_SIZE - 1); if (IS_ERR(p)) rc = PTR_ERR(p); else { @@ -3985,9 +3984,8 @@ static int __init fsg_bind(struct usb_ga if (backing_file_is_open(curlun)) { p = NULL; if (pathbuf) { - p = d_path(curlun->filp->f_path.dentry, - curlun->filp->f_path.mnt, - pathbuf, PATH_MAX); + p = d_path(>filp->f_path, + pathbuf, PATH_MAX); if (IS_ERR(p)) p = NULL; } Index: b/fs/compat_ioctl.c === --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -3544,7 +3544,7 @@ static void compat_ioctl_error(struct fi /* find the name of the device. */ path = (char *)__get_free_page(GFP_KERNEL); if (path) { - fn = d_path(filp->f_path.dentry, filp->f_path.mnt, path, PAGE_SIZE); + fn = d_path(>f_path, path, PAGE_SIZE); if (IS_ERR(fn)) fn = "?"; } Index: b/fs/dcache.c === --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1831,8 +1831,7 @@ Elong: /** * d_path - return the path of a dentry - * @dentry: dentry to report - * @vfsmnt: vfsmnt to which the dentry belongs + * @path: path to report * @buf: buffer to return value in * @buflen: buffer length * @@ -1843,8 +1842,7 @@
Re: [PATCH 6/7] d_path: Make d_path() use a struct path
On Fri, Nov 02, Bharata B Rao wrote: > > Did you miss the d_path() caller > arch/blackfin/kernel/traps.c:printk_address() ? > Sorry, yes I missed that one. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 6/7] d_path: Make d_path() use a struct path
On 11/2/07, Bharata B Rao <[EMAIL PROTECTED]> wrote: > On 10/29/07, Jan Blunck <[EMAIL PROTECTED]> wrote: > > > > > > Did you miss the d_path() caller > arch/blackfin/kernel/traps.c:printk_address() ? > Yes, I remember I saw that before. Please send patch again. -Bryan Wu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 6/7] d_path: Make d_path() use a struct path
On 11/2/07, Bharata B Rao [EMAIL PROTECTED] wrote: On 10/29/07, Jan Blunck [EMAIL PROTECTED] wrote: Did you miss the d_path() caller arch/blackfin/kernel/traps.c:printk_address() ? Yes, I remember I saw that before. Please send patch again. -Bryan Wu - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 6/7] d_path: Make d_path() use a struct path (2nd try)
d_path() is used on a dentry,vfsmount pair. Lets use a struct path to reflect this. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- arch/blackfin/kernel/traps.c | 12 +--- drivers/md/bitmap.c |8 +--- drivers/usb/gadget/file_storage.c |8 +++- fs/compat_ioctl.c |2 +- fs/dcache.c | 12 +--- fs/dcookies.c |2 +- fs/ecryptfs/super.c |5 ++--- fs/nfsd/export.c |3 ++- fs/proc/base.c|2 +- fs/seq_file.c |4 +++- fs/sysfs/file.c |5 ++--- fs/unionfs/super.c|3 +-- include/linux/dcache.h|5 +++-- kernel/audit.c|2 +- 14 files changed, 31 insertions(+), 42 deletions(-) Index: b/arch/blackfin/kernel/traps.c === --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -98,15 +98,13 @@ static int printk_address(unsigned long struct vm_area_struct *vma = vml-vma; if (address = vma-vm_start address vma-vm_end) { + char _tmpbuf[256]; char *name = p-comm; struct file *file = vma-vm_file; - if (file) { - char _tmpbuf[256]; - name = d_path(file-f_dentry, - file-f_vfsmnt, - _tmpbuf, - sizeof(_tmpbuf)); - } + + if (file) + name = d_path(file-f_path, _tmpbuf, + sizeof(_tmpbuf)); /* FLAT does not have its text aligned to the start of * the map while FDPIC ELF does ... Index: b/drivers/md/bitmap.c === --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -206,16 +206,10 @@ static void bitmap_checkfree(struct bitm /* copy the pathname of a file to a buffer */ char *file_path(struct file *file, char *buf, int count) { - struct dentry *d; - struct vfsmount *v; - if (!buf) return NULL; - d = file-f_path.dentry; - v = file-f_path.mnt; - - buf = d_path(d, v, buf, count); + buf = d_path(file-f_path, buf, count); return IS_ERR(buf) ? NULL : buf; } Index: b/drivers/usb/gadget/file_storage.c === --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -3567,8 +3567,7 @@ static ssize_t show_file(struct device * down_read(fsg-filesem); if (backing_file_is_open(curlun)) { // Get the complete pathname - p = d_path(curlun-filp-f_path.dentry, - curlun-filp-f_path.mnt, buf, PAGE_SIZE - 1); + p = d_path(curlun-filp-f_path, buf, PAGE_SIZE - 1); if (IS_ERR(p)) rc = PTR_ERR(p); else { @@ -3985,9 +3984,8 @@ static int __init fsg_bind(struct usb_ga if (backing_file_is_open(curlun)) { p = NULL; if (pathbuf) { - p = d_path(curlun-filp-f_path.dentry, - curlun-filp-f_path.mnt, - pathbuf, PATH_MAX); + p = d_path(curlun-filp-f_path, + pathbuf, PATH_MAX); if (IS_ERR(p)) p = NULL; } Index: b/fs/compat_ioctl.c === --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -3544,7 +3544,7 @@ static void compat_ioctl_error(struct fi /* find the name of the device. */ path = (char *)__get_free_page(GFP_KERNEL); if (path) { - fn = d_path(filp-f_path.dentry, filp-f_path.mnt, path, PAGE_SIZE); + fn = d_path(filp-f_path, path, PAGE_SIZE); if (IS_ERR(fn)) fn = ?; } Index: b/fs/dcache.c === --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1831,8 +1831,7 @@ Elong: /** * d_path - return the path of a dentry - * @dentry: dentry to report - * @vfsmnt: vfsmnt to which the dentry belongs + * @path: path to report * @buf: buffer to return value in * @buflen: buffer length * @@
Re: [PATCH 6/7] d_path: Make d_path() use a struct path
On Fri, Nov 02, Bharata B Rao wrote: Did you miss the d_path() caller arch/blackfin/kernel/traps.c:printk_address() ? Sorry, yes I missed that one. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 6/7] d_path: Make d_path() use a struct path (2nd try)
On 11/3/07, Jan Blunck [EMAIL PROTECTED] wrote: d_path() is used on a dentry,vfsmount pair. Lets use a struct path to reflect this. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- arch/blackfin/kernel/traps.c | 12 +--- Thanks,Acked-by: Bryan Wu [EMAIL PROTECTED] drivers/md/bitmap.c |8 +--- drivers/usb/gadget/file_storage.c |8 +++- fs/compat_ioctl.c |2 +- fs/dcache.c | 12 +--- fs/dcookies.c |2 +- fs/ecryptfs/super.c |5 ++--- fs/nfsd/export.c |3 ++- fs/proc/base.c|2 +- fs/seq_file.c |4 +++- fs/sysfs/file.c |5 ++--- fs/unionfs/super.c|3 +-- include/linux/dcache.h|5 +++-- kernel/audit.c|2 +- 14 files changed, 31 insertions(+), 42 deletions(-) Index: b/arch/blackfin/kernel/traps.c === --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -98,15 +98,13 @@ static int printk_address(unsigned long struct vm_area_struct *vma = vml-vma; if (address = vma-vm_start address vma-vm_end) { + char _tmpbuf[256]; char *name = p-comm; struct file *file = vma-vm_file; - if (file) { - char _tmpbuf[256]; - name = d_path(file-f_dentry, - file-f_vfsmnt, - _tmpbuf, - sizeof(_tmpbuf)); - } + + if (file) + name = d_path(file-f_path, _tmpbuf, + sizeof(_tmpbuf)); /* FLAT does not have its text aligned to the start of * the map while FDPIC ELF does ... Index: b/drivers/md/bitmap.c === --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -206,16 +206,10 @@ static void bitmap_checkfree(struct bitm /* copy the pathname of a file to a buffer */ char *file_path(struct file *file, char *buf, int count) { - struct dentry *d; - struct vfsmount *v; - if (!buf) return NULL; - d = file-f_path.dentry; - v = file-f_path.mnt; - - buf = d_path(d, v, buf, count); + buf = d_path(file-f_path, buf, count); return IS_ERR(buf) ? NULL : buf; } Index: b/drivers/usb/gadget/file_storage.c === --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -3567,8 +3567,7 @@ static ssize_t show_file(struct device * down_read(fsg-filesem); if (backing_file_is_open(curlun)) { // Get the complete pathname - p = d_path(curlun-filp-f_path.dentry, - curlun-filp-f_path.mnt, buf, PAGE_SIZE - 1); + p = d_path(curlun-filp-f_path, buf, PAGE_SIZE - 1); if (IS_ERR(p)) rc = PTR_ERR(p); else { @@ -3985,9 +3984,8 @@ static int __init fsg_bind(struct usb_ga if (backing_file_is_open(curlun)) { p = NULL; if (pathbuf) { - p = d_path(curlun-filp-f_path.dentry, - curlun-filp-f_path.mnt, - pathbuf, PATH_MAX); + p = d_path(curlun-filp-f_path, + pathbuf, PATH_MAX); if (IS_ERR(p)) p = NULL; } Index: b/fs/compat_ioctl.c === --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -3544,7 +3544,7 @@ static void compat_ioctl_error(struct fi /* find the name of the device. */ path = (char *)__get_free_page(GFP_KERNEL); if (path) { - fn = d_path(filp-f_path.dentry, filp-f_path.mnt, path, PAGE_SIZE); + fn = d_path(filp-f_path, path, PAGE_SIZE); if (IS_ERR(fn)) fn = ?; } Index: b/fs/dcache.c === --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1831,8 +1831,7 @@ Elong: /** * d_path - return the
Re: [PATCH 6/7] d_path: Make d_path() use a struct path
On 10/29/07, Jan Blunck <[EMAIL PROTECTED]> wrote: > > Did you miss the d_path() caller arch/blackfin/kernel/traps.c:printk_address() ? Regards, Bharata. -- "Men come and go but mountains remain" -- Ruskin Bond. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 6/7] d_path: Make d_path() use a struct path
d_path() is used on a pair. Lets use a struct path to reflect this. Signed-off-by: Jan Blunck <[EMAIL PROTECTED]> --- drivers/md/bitmap.c |8 +--- drivers/usb/gadget/file_storage.c |3 +-- fs/compat_ioctl.c |2 +- fs/dcache.c | 12 +--- fs/dcookies.c |2 +- fs/ecryptfs/super.c |5 ++--- fs/nfsd/export.c |3 ++- fs/proc/base.c|2 +- fs/seq_file.c |4 +++- fs/sysfs/file.c |5 ++--- fs/unionfs/super.c|3 +-- include/linux/dcache.h|5 +++-- kernel/audit.c|2 +- 13 files changed, 24 insertions(+), 32 deletions(-) Index: b/drivers/md/bitmap.c === --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -206,16 +206,10 @@ static void bitmap_checkfree(struct bitm /* copy the pathname of a file to a buffer */ char *file_path(struct file *file, char *buf, int count) { - struct dentry *d; - struct vfsmount *v; - if (!buf) return NULL; - d = file->f_path.dentry; - v = file->f_path.mnt; - - buf = d_path(d, v, buf, count); + buf = d_path(>f_path, buf, count); return IS_ERR(buf) ? NULL : buf; } Index: b/drivers/usb/gadget/file_storage.c === --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -3567,8 +3567,7 @@ static ssize_t show_file(struct device * down_read(>filesem); if (backing_file_is_open(curlun)) { // Get the complete pathname - p = d_path(curlun->filp->f_path.dentry, - curlun->filp->f_path.mnt, buf, PAGE_SIZE - 1); + p = d_path(>filp->f_path, buf, PAGE_SIZE - 1); if (IS_ERR(p)) rc = PTR_ERR(p); else { Index: b/fs/compat_ioctl.c === --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -3544,7 +3544,7 @@ static void compat_ioctl_error(struct fi /* find the name of the device. */ path = (char *)__get_free_page(GFP_KERNEL); if (path) { - fn = d_path(filp->f_path.dentry, filp->f_path.mnt, path, PAGE_SIZE); + fn = d_path(>f_path, path, PAGE_SIZE); if (IS_ERR(fn)) fn = "?"; } Index: b/fs/dcache.c === --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1831,8 +1831,7 @@ Elong: /** * d_path - return the path of a dentry - * @dentry: dentry to report - * @vfsmnt: vfsmnt to which the dentry belongs + * @path: path to report * @buf: buffer to return value in * @buflen: buffer length * @@ -1843,8 +1842,7 @@ Elong: * * "buflen" should be positive. Caller holds the dcache_lock. */ -char *d_path(struct dentry *dentry, struct vfsmount *vfsmnt, -char *buf, int buflen) +char *d_path(struct path *path, char *buf, int buflen) { char *res; struct path root; @@ -1856,15 +1854,15 @@ char *d_path(struct dentry *dentry, stru * user wants to identify the object in /proc/pid/fd/. The little hack * below allows us to generate a name for these objects on demand: */ - if (dentry->d_op && dentry->d_op->d_dname) - return dentry->d_op->d_dname(dentry, buf, buflen); + if (path->dentry->d_op && path->dentry->d_op->d_dname) + return path->dentry->d_op->d_dname(path->dentry, buf, buflen); read_lock(>fs->lock); root = current->fs->root; path_get(>fs->root); read_unlock(>fs->lock); spin_lock(_lock); - res = __d_path(dentry, vfsmnt, , buf, buflen); + res = __d_path(path->dentry, path->mnt, , buf, buflen); spin_unlock(_lock); path_put(); return res; Index: b/fs/dcookies.c === --- a/fs/dcookies.c +++ b/fs/dcookies.c @@ -170,7 +170,7 @@ asmlinkage long sys_lookup_dcookie(u64 c goto out; /* FIXME: (deleted) ? */ - path = d_path(dcs->path.dentry, dcs->path.mnt, kbuf, PAGE_SIZE); + path = d_path(>path, kbuf, PAGE_SIZE); if (IS_ERR(path)) { err = PTR_ERR(path); Index: b/fs/ecryptfs/super.c === --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c @@ -163,8 +163,7 @@ static void ecryptfs_clear_inode(struct static int ecryptfs_show_options(struct seq_file *m, struct vfsmount *mnt) { struct super_block *sb = mnt->mnt_sb; - struct dentry *lower_root_dentry = ecryptfs_dentry_to_lower(sb->s_root); - struct vfsmount
[PATCH 6/7] d_path: Make d_path() use a struct path
d_path() is used on a dentry,vfsmount pair. Lets use a struct path to reflect this. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- drivers/md/bitmap.c |8 +--- drivers/usb/gadget/file_storage.c |3 +-- fs/compat_ioctl.c |2 +- fs/dcache.c | 12 +--- fs/dcookies.c |2 +- fs/ecryptfs/super.c |5 ++--- fs/nfsd/export.c |3 ++- fs/proc/base.c|2 +- fs/seq_file.c |4 +++- fs/sysfs/file.c |5 ++--- fs/unionfs/super.c|3 +-- include/linux/dcache.h|5 +++-- kernel/audit.c|2 +- 13 files changed, 24 insertions(+), 32 deletions(-) Index: b/drivers/md/bitmap.c === --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -206,16 +206,10 @@ static void bitmap_checkfree(struct bitm /* copy the pathname of a file to a buffer */ char *file_path(struct file *file, char *buf, int count) { - struct dentry *d; - struct vfsmount *v; - if (!buf) return NULL; - d = file-f_path.dentry; - v = file-f_path.mnt; - - buf = d_path(d, v, buf, count); + buf = d_path(file-f_path, buf, count); return IS_ERR(buf) ? NULL : buf; } Index: b/drivers/usb/gadget/file_storage.c === --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -3567,8 +3567,7 @@ static ssize_t show_file(struct device * down_read(fsg-filesem); if (backing_file_is_open(curlun)) { // Get the complete pathname - p = d_path(curlun-filp-f_path.dentry, - curlun-filp-f_path.mnt, buf, PAGE_SIZE - 1); + p = d_path(curlun-filp-f_path, buf, PAGE_SIZE - 1); if (IS_ERR(p)) rc = PTR_ERR(p); else { Index: b/fs/compat_ioctl.c === --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -3544,7 +3544,7 @@ static void compat_ioctl_error(struct fi /* find the name of the device. */ path = (char *)__get_free_page(GFP_KERNEL); if (path) { - fn = d_path(filp-f_path.dentry, filp-f_path.mnt, path, PAGE_SIZE); + fn = d_path(filp-f_path, path, PAGE_SIZE); if (IS_ERR(fn)) fn = ?; } Index: b/fs/dcache.c === --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1831,8 +1831,7 @@ Elong: /** * d_path - return the path of a dentry - * @dentry: dentry to report - * @vfsmnt: vfsmnt to which the dentry belongs + * @path: path to report * @buf: buffer to return value in * @buflen: buffer length * @@ -1843,8 +1842,7 @@ Elong: * * buflen should be positive. Caller holds the dcache_lock. */ -char *d_path(struct dentry *dentry, struct vfsmount *vfsmnt, -char *buf, int buflen) +char *d_path(struct path *path, char *buf, int buflen) { char *res; struct path root; @@ -1856,15 +1854,15 @@ char *d_path(struct dentry *dentry, stru * user wants to identify the object in /proc/pid/fd/. The little hack * below allows us to generate a name for these objects on demand: */ - if (dentry-d_op dentry-d_op-d_dname) - return dentry-d_op-d_dname(dentry, buf, buflen); + if (path-dentry-d_op path-dentry-d_op-d_dname) + return path-dentry-d_op-d_dname(path-dentry, buf, buflen); read_lock(current-fs-lock); root = current-fs-root; path_get(current-fs-root); read_unlock(current-fs-lock); spin_lock(dcache_lock); - res = __d_path(dentry, vfsmnt, root, buf, buflen); + res = __d_path(path-dentry, path-mnt, root, buf, buflen); spin_unlock(dcache_lock); path_put(root); return res; Index: b/fs/dcookies.c === --- a/fs/dcookies.c +++ b/fs/dcookies.c @@ -170,7 +170,7 @@ asmlinkage long sys_lookup_dcookie(u64 c goto out; /* FIXME: (deleted) ? */ - path = d_path(dcs-path.dentry, dcs-path.mnt, kbuf, PAGE_SIZE); + path = d_path(dcs-path, kbuf, PAGE_SIZE); if (IS_ERR(path)) { err = PTR_ERR(path); Index: b/fs/ecryptfs/super.c === --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c @@ -163,8 +163,7 @@ static void ecryptfs_clear_inode(struct static int ecryptfs_show_options(struct seq_file *m, struct vfsmount *mnt) { struct super_block *sb = mnt-mnt_sb; - struct dentry *lower_root_dentry =
Re: [PATCH 6/7] d_path: Make d_path() use a struct path
On 10/29/07, Jan Blunck [EMAIL PROTECTED] wrote: Did you miss the d_path() caller arch/blackfin/kernel/traps.c:printk_address() ? Regards, Bharata. -- Men come and go but mountains remain -- Ruskin Bond. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/