Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97251
b: refs/heads/master
c: 6bcfd60
h: refs/heads/master
i:
  97249: caba965
  97247: 55cb5fc
v: v3
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed May 24, 2008
1 parent eaf8993 commit 8d096b9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03de250a269bfa8e6a9e6ccb4a1dbce19dae8a61
refs/heads/master: 6bcfd601861cce45ca73ac1d714f1286b6b3f0d4
17 changes: 4 additions & 13 deletions trunk/drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -3987,8 +3987,8 @@ static int get_bitmap_file(mddev_t * mddev, void __user * arg)
if (!buf)
goto out;

ptr = file_path(mddev->bitmap->file, buf, sizeof(file->pathname));
if (!ptr)
ptr = d_path(&mddev->bitmap->file->f_path, buf, sizeof(file->pathname));
if (IS_ERR(ptr))
goto out;

strcpy(file->pathname, ptr);
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/raid/bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ int bitmap_create(mddev_t *mddev);
void bitmap_flush(mddev_t *mddev);
void bitmap_destroy(mddev_t *mddev);

char *file_path(struct file *file, char *buf, int count);
void bitmap_print_sb(struct bitmap *bitmap);
void bitmap_update_sb(struct bitmap *bitmap);

Expand Down

0 comments on commit 8d096b9

Please sign in to comment.