]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/bitmap.c
md: kill file_path wrapper
[linux-2.6-omap-h63xx.git] / drivers / md / bitmap.c
index c14dacdacfac530c61370b14de5686d6b51c02a3..b26927ce889cead2717db3f4d3896bbd9bacc4e2 100644 (file)
@@ -203,17 +203,6 @@ static void bitmap_checkfree(struct bitmap *bitmap, unsigned long page)
  * bitmap file handling - read and write the bitmap file and its superblock
  */
 
-/* copy the pathname of a file to a buffer */
-char *file_path(struct file *file, char *buf, int count)
-{
-       if (!buf)
-               return NULL;
-
-       buf = d_path(&file->f_path, buf, count);
-
-       return IS_ERR(buf) ? NULL : buf;
-}
-
 /*
  * basic page I/O operations
  */
@@ -721,11 +710,13 @@ static void bitmap_file_kick(struct bitmap *bitmap)
                if (bitmap->file) {
                        path = kmalloc(PAGE_SIZE, GFP_KERNEL);
                        if (path)
-                               ptr = file_path(bitmap->file, path, PAGE_SIZE);
+                               ptr = d_path(&bitmap->file->f_path, path,
+                                            PAGE_SIZE);
+
 
                        printk(KERN_ALERT
                              "%s: kicking failed bitmap file %s from array!\n",
-                             bmname(bitmap), ptr ? ptr : "");
+                             bmname(bitmap), IS_ERR(ptr) ? "" : ptr);
 
                        kfree(path);
                } else