Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The mount path explicitly rejects concurrent mounts of the same backing device, contradicting the commit message claim that multiple mounts should share the superblock. --
commit c082254e4802428a0767926c0085c3cbeace41cb Author: John Groves <[email protected]> famfs: Module operations, fs_context, and mount This commit introduces the initial module operations for famfs, including filesystem registration, mount parameter parsing, superblock initialization, and DAX device lookup. > diff --git a/fs/famfs/famfs_inode.c b/fs/famfs/famfs_inode.c > new file mode 100644 > index 0000000000000..5a13903da61b7 > --- /dev/null > +++ b/fs/famfs/famfs_inode.c [ ... ] > +static int > +famfs_get_tree(struct fs_context *fc) > +{ > + struct famfs_fs_info *fsi = fc->s_fs_info; > + struct super_block *sb; > + struct inode *inode; > + dev_t daxdevno; > + int err; [ ... ] > + /* This will set sb->s_dev=daxdevno */ > + sb = sget_dev(fc, daxdevno); > + if (IS_ERR(sb)) { > + pr_debug("%s: sget_dev error\n", __func__); > + return PTR_ERR(sb); > + } > + > + if (sb->s_root) { > + pr_debug("%s: found a matching superblock for %s\n", > + __func__, fc->source); > + > + /* We don't expect to find a match by dev_t; if we do, it must > + * already be mounted, so we bail > + */ > + err = -EBUSY; > + goto deactivate_out; [Severity: Medium] Does returning -EBUSY here intentionally prevent sharing the superblock across multiple mounts? The commit message states: "so a second mount of the same device shares one super, much as a block filesystem keys on its block device." However, this check appears to explicitly reject concurrent mounts of the same DAX backing device rather than sharing the existing superblock. > + } else { > + pr_debug("%s: initializing new superblock for %s\n", > + __func__, fc->source); > + famfs_fill_super(sb, fc); > + } -- Sashiko AI review ยท https://sashiko.dev/#/patchset/010001a04e801a4e-8eb212cd-b263-4043-ab65-33e480d2d7d4-000...@email.amazonses.com?part=2
