Re: [PATCH 13/13] Rename {__}d_path() to {__}print_path() and fix comments

2007-10-22 Thread Andrew Morton
On Mon, 22 Oct 2007 11:14:43 +0100
Christoph Hellwig <[EMAIL PROTECTED]> wrote:

> On Mon, Oct 22, 2007 at 12:34:19PM +0530, Bharata B Rao wrote:
> > Changes the name of d_path() and __d_path() to print_path() and 
> > __print_path()
> > respectively and fixes the kerneldoc comments for print_path().
> 
> I don't think we want to put in this rename until d_path is changed to
> actually take a struct path * describing the path to be printed.

I didn't merge this 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 13/13] Rename {__}d_path() to {__}print_path() and fix comments

2007-10-22 Thread Christoph Hellwig
On Mon, Oct 22, 2007 at 12:34:19PM +0530, Bharata B Rao wrote:
> Changes the name of d_path() and __d_path() to print_path() and __print_path()
> respectively and fixes the kerneldoc comments for print_path().

I don't think we want to put in this rename until d_path is changed to
actually take a struct path * describing the path to be printed.

-
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 13/13] Rename {__}d_path() to {__}print_path() and fix comments

2007-10-22 Thread Bharata B Rao
Changes the name of d_path() and __d_path() to print_path() and __print_path()
respectively and fixes the kerneldoc comments for print_path().

Signed-off-by: Bharata B Rao <[EMAIL PROTECTED]>
---
 arch/blackfin/kernel/traps.c  |2 -
 drivers/md/bitmap.c   |2 -
 drivers/usb/gadget/file_storage.c |4 +--
 fs/compat_ioctl.c |3 +-
 fs/dcache.c   |   41 +-
 fs/dcookies.c |2 -
 fs/ecryptfs/super.c   |2 -
 fs/nfsd/export.c  |2 -
 fs/proc/base.c|2 -
 fs/seq_file.c |2 -
 fs/sysfs/file.c   |2 -
 fs/unionfs/super.c|2 -
 include/linux/dcache.h|2 -
 kernel/audit.c|2 -
 14 files changed, 34 insertions(+), 36 deletions(-)

--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -102,7 +102,7 @@ static int printk_address(unsigned long 
struct file *file = vma->vm_file;
if (file) {
char _tmpbuf[256];
-   name = d_path(file->f_dentry,
+   name = print_path(file->f_dentry,
  file->f_vfsmnt,
  _tmpbuf,
  sizeof(_tmpbuf));
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -215,7 +215,7 @@ char *file_path(struct file *file, char 
d = file->f_path.dentry;
v = file->f_path.mnt;
 
-   buf = d_path(d, v, buf, count);
+   buf = print_path(d, v, buf, count);
 
return IS_ERR(buf) ? NULL : buf;
 }
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -3567,7 +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,
+   p = print_path(curlun->filp->f_path.dentry,
curlun->filp->f_path.mnt, buf, PAGE_SIZE - 1);
if (IS_ERR(p))
rc = PTR_ERR(p);
@@ -3985,7 +3985,7 @@ 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,
+   p = print_path(curlun->filp->f_path.dentry,
curlun->filp->f_path.mnt,
pathbuf, PATH_MAX);
if (IS_ERR(p))
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -3544,7 +3544,8 @@ 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 = print_path(filp->f_path.dentry, filp->f_path.mnt,
+   path, PAGE_SIZE);
if (IS_ERR(fn))
fn = "?";
}
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1762,23 +1762,7 @@ shouldnt_be_hashed:
goto shouldnt_be_hashed;
 }
 
-/**
- * d_path - return the path of a dentry
- * @dentry: dentry to report
- * @vfsmnt: vfsmnt to which the dentry belongs
- * @root: root dentry
- * @rootmnt: vfsmnt to which the root dentry belongs
- * @buffer: buffer to return value in
- * @buflen: buffer length
- *
- * Convert a dentry into an ASCII path name. If the entry has been deleted
- * the string " (deleted)" is appended. Note that this is ambiguous.
- *
- * Returns the buffer or an error code if the path was too long.
- *
- * "buflen" should be positive. Caller holds the dcache_lock.
- */
-static char * __d_path( struct dentry *dentry, struct vfsmount *vfsmnt,
+static char *__print_path( struct dentry *dentry, struct vfsmount *vfsmnt,
struct path *root, char *buffer, int buflen)
 {
char * end = buffer+buflen;
@@ -1845,8 +1829,21 @@ Elong:
return ERR_PTR(-ENAMETOOLONG);
 }
 
-/* write full pathname into buffer and return start of pathname */
-char * d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
+/**
+ * print_path - return the path of a dentry
+ * @dentry: dentry to report
+ * @vfsmnt: vfsmnt to which the dentry belongs
+ * @buffer: buffer to return value in
+ * @buflen: buffer length
+ *
+ * Convert a dentry into an ASCII path name. If the entry has been deleted
+ * the string " (deleted)" is appended. Note that this is ambiguous.
+ *
+ * Returns the buffer or an error code if the path was too long.
+ *
+ * "buflen" should be positive.
+ */

[PATCH 13/13] Rename {__}d_path() to {__}print_path() and fix comments

2007-10-22 Thread Bharata B Rao
Changes the name of d_path() and __d_path() to print_path() and __print_path()
respectively and fixes the kerneldoc comments for print_path().

Signed-off-by: Bharata B Rao [EMAIL PROTECTED]
---
 arch/blackfin/kernel/traps.c  |2 -
 drivers/md/bitmap.c   |2 -
 drivers/usb/gadget/file_storage.c |4 +--
 fs/compat_ioctl.c |3 +-
 fs/dcache.c   |   41 +-
 fs/dcookies.c |2 -
 fs/ecryptfs/super.c   |2 -
 fs/nfsd/export.c  |2 -
 fs/proc/base.c|2 -
 fs/seq_file.c |2 -
 fs/sysfs/file.c   |2 -
 fs/unionfs/super.c|2 -
 include/linux/dcache.h|2 -
 kernel/audit.c|2 -
 14 files changed, 34 insertions(+), 36 deletions(-)

--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -102,7 +102,7 @@ static int printk_address(unsigned long 
struct file *file = vma-vm_file;
if (file) {
char _tmpbuf[256];
-   name = d_path(file-f_dentry,
+   name = print_path(file-f_dentry,
  file-f_vfsmnt,
  _tmpbuf,
  sizeof(_tmpbuf));
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -215,7 +215,7 @@ char *file_path(struct file *file, char 
d = file-f_path.dentry;
v = file-f_path.mnt;
 
-   buf = d_path(d, v, buf, count);
+   buf = print_path(d, v, buf, count);
 
return IS_ERR(buf) ? NULL : buf;
 }
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -3567,7 +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,
+   p = print_path(curlun-filp-f_path.dentry,
curlun-filp-f_path.mnt, buf, PAGE_SIZE - 1);
if (IS_ERR(p))
rc = PTR_ERR(p);
@@ -3985,7 +3985,7 @@ 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,
+   p = print_path(curlun-filp-f_path.dentry,
curlun-filp-f_path.mnt,
pathbuf, PATH_MAX);
if (IS_ERR(p))
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -3544,7 +3544,8 @@ 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 = print_path(filp-f_path.dentry, filp-f_path.mnt,
+   path, PAGE_SIZE);
if (IS_ERR(fn))
fn = ?;
}
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1762,23 +1762,7 @@ shouldnt_be_hashed:
goto shouldnt_be_hashed;
 }
 
-/**
- * d_path - return the path of a dentry
- * @dentry: dentry to report
- * @vfsmnt: vfsmnt to which the dentry belongs
- * @root: root dentry
- * @rootmnt: vfsmnt to which the root dentry belongs
- * @buffer: buffer to return value in
- * @buflen: buffer length
- *
- * Convert a dentry into an ASCII path name. If the entry has been deleted
- * the string  (deleted) is appended. Note that this is ambiguous.
- *
- * Returns the buffer or an error code if the path was too long.
- *
- * buflen should be positive. Caller holds the dcache_lock.
- */
-static char * __d_path( struct dentry *dentry, struct vfsmount *vfsmnt,
+static char *__print_path( struct dentry *dentry, struct vfsmount *vfsmnt,
struct path *root, char *buffer, int buflen)
 {
char * end = buffer+buflen;
@@ -1845,8 +1829,21 @@ Elong:
return ERR_PTR(-ENAMETOOLONG);
 }
 
-/* write full pathname into buffer and return start of pathname */
-char * d_path(struct dentry *dentry, struct vfsmount *vfsmnt,
+/**
+ * print_path - return the path of a dentry
+ * @dentry: dentry to report
+ * @vfsmnt: vfsmnt to which the dentry belongs
+ * @buffer: buffer to return value in
+ * @buflen: buffer length
+ *
+ * Convert a dentry into an ASCII path name. If the entry has been deleted
+ * the string  (deleted) is appended. Note that this is ambiguous.
+ *
+ * Returns the buffer or an error code if the path was too long.
+ *
+ * buflen should be positive.
+ */
+char *print_path(struct dentry 

Re: [PATCH 13/13] Rename {__}d_path() to {__}print_path() and fix comments

2007-10-22 Thread Christoph Hellwig
On Mon, Oct 22, 2007 at 12:34:19PM +0530, Bharata B Rao wrote:
 Changes the name of d_path() and __d_path() to print_path() and __print_path()
 respectively and fixes the kerneldoc comments for print_path().

I don't think we want to put in this rename until d_path is changed to
actually take a struct path * describing the path to be printed.

-
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 13/13] Rename {__}d_path() to {__}print_path() and fix comments

2007-10-22 Thread Andrew Morton
On Mon, 22 Oct 2007 11:14:43 +0100
Christoph Hellwig [EMAIL PROTECTED] wrote:

 On Mon, Oct 22, 2007 at 12:34:19PM +0530, Bharata B Rao wrote:
  Changes the name of d_path() and __d_path() to print_path() and 
  __print_path()
  respectively and fixes the kerneldoc comments for print_path().
 
 I don't think we want to put in this rename until d_path is changed to
 actually take a struct path * describing the path to be printed.

I didn't merge this 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/