diff options
author | Christoph Hellwig <hch@lst.de> | 2008-05-23 16:04:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-24 12:56:09 -0400 |
commit | 6bcfd601861cce45ca73ac1d714f1286b6b3f0d4 (patch) | |
tree | 175173d057e10dd006d6dbd033395977aff55dd9 /drivers/md | |
parent | 03de250a269bfa8e6a9e6ccb4a1dbce19dae8a61 (diff) |
md: kill file_path wrapper
Kill the trivial and rather pointless file_path wrapper around d_path.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/bitmap.c | 17 | ||||
-rw-r--r-- | drivers/md/md.c | 4 |
2 files changed, 6 insertions, 15 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index c14dacdacfac..b26927ce889c 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -203,17 +203,6 @@ static void bitmap_checkfree(struct bitmap *bitmap, unsigned long page) | |||
203 | * bitmap file handling - read and write the bitmap file and its superblock | 203 | * bitmap file handling - read and write the bitmap file and its superblock |
204 | */ | 204 | */ |
205 | 205 | ||
206 | /* copy the pathname of a file to a buffer */ | ||
207 | char *file_path(struct file *file, char *buf, int count) | ||
208 | { | ||
209 | if (!buf) | ||
210 | return NULL; | ||
211 | |||
212 | buf = d_path(&file->f_path, buf, count); | ||
213 | |||
214 | return IS_ERR(buf) ? NULL : buf; | ||
215 | } | ||
216 | |||
217 | /* | 206 | /* |
218 | * basic page I/O operations | 207 | * basic page I/O operations |
219 | */ | 208 | */ |
@@ -721,11 +710,13 @@ static void bitmap_file_kick(struct bitmap *bitmap) | |||
721 | if (bitmap->file) { | 710 | if (bitmap->file) { |
722 | path = kmalloc(PAGE_SIZE, GFP_KERNEL); | 711 | path = kmalloc(PAGE_SIZE, GFP_KERNEL); |
723 | if (path) | 712 | if (path) |
724 | ptr = file_path(bitmap->file, path, PAGE_SIZE); | 713 | ptr = d_path(&bitmap->file->f_path, path, |
714 | PAGE_SIZE); | ||
715 | |||
725 | 716 | ||
726 | printk(KERN_ALERT | 717 | printk(KERN_ALERT |
727 | "%s: kicking failed bitmap file %s from array!\n", | 718 | "%s: kicking failed bitmap file %s from array!\n", |
728 | bmname(bitmap), ptr ? ptr : ""); | 719 | bmname(bitmap), IS_ERR(ptr) ? "" : ptr); |
729 | 720 | ||
730 | kfree(path); | 721 | kfree(path); |
731 | } else | 722 | } else |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 83eb78b00137..d31aa6f33a6a 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -3987,8 +3987,8 @@ static int get_bitmap_file(mddev_t * mddev, void __user * arg) | |||
3987 | if (!buf) | 3987 | if (!buf) |
3988 | goto out; | 3988 | goto out; |
3989 | 3989 | ||
3990 | ptr = file_path(mddev->bitmap->file, buf, sizeof(file->pathname)); | 3990 | ptr = d_path(&mddev->bitmap->file->f_path, buf, sizeof(file->pathname)); |
3991 | if (!ptr) | 3991 | if (IS_ERR(ptr)) |
3992 | goto out; | 3992 | goto out; |
3993 | 3993 | ||
3994 | strcpy(file->pathname, ptr); | 3994 | strcpy(file->pathname, ptr); |