Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dlmfs: convert to the new mount API

Patch series "ocfs2, dlmfs: convert to the new mount API".


This patch (of 2):

Convert dlmfs to the new mount API.

Link: https://lkml.kernel.org/r/20241028144443.609151-1-sandeen@redhat.com
Link: https://lkml.kernel.org/r/20241028144443.609151-2-sandeen@redhat.com
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Tested-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Tested-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Eric Sandeen and committed by
Andrew Morton
94e0c289 3c16fc0c

+16 -7
+16 -7
fs/ocfs2/dlmfs/dlmfs.c
··· 20 20 21 21 #include <linux/module.h> 22 22 #include <linux/fs.h> 23 + #include <linux/fs_context.h> 23 24 #include <linux/pagemap.h> 24 25 #include <linux/types.h> 25 26 #include <linux/slab.h> ··· 507 506 return status; 508 507 } 509 508 510 - static int dlmfs_fill_super(struct super_block * sb, 511 - void * data, 512 - int silent) 509 + static int dlmfs_fill_super(struct super_block *sb, struct fs_context *fc) 513 510 { 514 511 sb->s_maxbytes = MAX_LFS_FILESIZE; 515 512 sb->s_blocksize = PAGE_SIZE; ··· 555 556 .setattr = dlmfs_file_setattr, 556 557 }; 557 558 558 - static struct dentry *dlmfs_mount(struct file_system_type *fs_type, 559 - int flags, const char *dev_name, void *data) 559 + static int dlmfs_get_tree(struct fs_context *fc) 560 560 { 561 - return mount_nodev(fs_type, flags, data, dlmfs_fill_super); 561 + return get_tree_nodev(fc, dlmfs_fill_super); 562 + } 563 + 564 + static const struct fs_context_operations dlmfs_context_ops = { 565 + .get_tree = dlmfs_get_tree, 566 + }; 567 + 568 + static int dlmfs_init_fs_context(struct fs_context *fc) 569 + { 570 + fc->ops = &dlmfs_context_ops; 571 + 572 + return 0; 562 573 } 563 574 564 575 static struct file_system_type dlmfs_fs_type = { 565 576 .owner = THIS_MODULE, 566 577 .name = "ocfs2_dlmfs", 567 - .mount = dlmfs_mount, 568 578 .kill_sb = kill_litter_super, 579 + .init_fs_context = dlmfs_init_fs_context, 569 580 }; 570 581 MODULE_ALIAS_FS("ocfs2_dlmfs"); 571 582