Merge tag 'rcu.2023.08.21a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck...
[platform/kernel/linux-rpi.git] / fs / cramfs / inode.c
index 27c6597..5ee7d7b 100644 (file)
@@ -133,7 +133,8 @@ static struct inode *get_cramfs_inode(struct super_block *sb,
        }
 
        /* Struct copy intentional */
-       inode->i_mtime = inode->i_atime = inode->i_ctime = zerotime;
+       inode->i_mtime = inode->i_atime = inode_set_ctime_to_ts(inode,
+                                                               zerotime);
        /* inode->i_nlink is left 1 - arguably wrong for directories,
           but it's the best we can do without reading the directory
           contents.  1 yields the right result in GNU find, even
@@ -485,12 +486,16 @@ static void cramfs_kill_sb(struct super_block *sb)
 {
        struct cramfs_sb_info *sbi = CRAMFS_SB(sb);
 
+       generic_shutdown_super(sb);
+
        if (IS_ENABLED(CONFIG_CRAMFS_MTD) && sb->s_mtd) {
                if (sbi && sbi->mtd_point_size)
                        mtd_unpoint(sb->s_mtd, 0, sbi->mtd_point_size);
-               kill_mtd_super(sb);
+               put_mtd_device(sb->s_mtd);
+               sb->s_mtd = NULL;
        } else if (IS_ENABLED(CONFIG_CRAMFS_BLOCKDEV) && sb->s_bdev) {
-               kill_block_super(sb);
+               sync_blockdev(sb->s_bdev);
+               blkdev_put(sb->s_bdev, sb);
        }
        kfree(sbi);
 }