X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fdebugfs%2Finode.c;fp=fs%2Fdebugfs%2Finode.c;h=d44d24987915e3fe00c07c4165a377b90c8fdbc1;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=03888824b3a52da60ebdefd7019cc50d27984c74;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 03888824b..d44d24987 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -16,6 +16,7 @@ /* uncomment to get debug messages from the debug filesystem, ah the irony. */ /* #define DEBUG */ +#include #include #include #include @@ -40,6 +41,7 @@ static struct inode *debugfs_get_inode(struct super_block *sb, int mode, dev_t d inode->i_mode = mode; inode->i_uid = 0; inode->i_gid = 0; + inode->i_blksize = PAGE_CACHE_SIZE; inode->i_blocks = 0; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; switch (mode & S_IFMT) { @@ -109,11 +111,11 @@ static int debug_fill_super(struct super_block *sb, void *data, int silent) return simple_fill_super(sb, DEBUGFS_MAGIC, debug_files); } -static int debug_get_sb(struct file_system_type *fs_type, - int flags, const char *dev_name, - void *data, struct vfsmount *mnt) +static struct super_block *debug_get_sb(struct file_system_type *fs_type, + int flags, const char *dev_name, + void *data) { - return get_sb_single(fs_type, flags, data, debug_fill_super, mnt); + return get_sb_single(fs_type, flags, data, debug_fill_super); } static struct file_system_type debug_fs_type = { @@ -168,7 +170,7 @@ static int debugfs_create_by_name(const char *name, mode_t mode, * directory dentry if set. If this paramater is NULL, then the * file will be created in the root of the debugfs filesystem. * @data: a pointer to something that the caller will want to get to later - * on. The inode.i_private pointer will point to this value on + * on. The inode.u.generic_ip pointer will point to this value on * the open() call. * @fops: a pointer to a struct file_operations that should be used for * this file. @@ -190,14 +192,14 @@ static int debugfs_create_by_name(const char *name, mode_t mode, */ struct dentry *debugfs_create_file(const char *name, mode_t mode, struct dentry *parent, void *data, - const struct file_operations *fops) + struct file_operations *fops) { struct dentry *dentry = NULL; int error; pr_debug("debugfs: creating file '%s'\n",name); - error = simple_pin_fs(&debug_fs_type, &debugfs_mount, &debugfs_mount_count); + error = simple_pin_fs("debugfs", &debugfs_mount, &debugfs_mount_count); if (error) goto exit; @@ -209,7 +211,7 @@ struct dentry *debugfs_create_file(const char *name, mode_t mode, if (dentry->d_inode) { if (data) - dentry->d_inode->i_private = data; + dentry->d_inode->u.generic_ip = data; if (fops) dentry->d_inode->i_fop = fops; }