ACPI: Fix a hard coding style when determining if a device is a container, v3
[platform/adaptation/renesas_rcar/renesas_kernel.git] / fs / logfs / inode.c
index 6984562..adb9011 100644 (file)
@@ -208,8 +208,8 @@ static void logfs_init_inode(struct super_block *sb, struct inode *inode)
        li->li_height   = 0;
        li->li_used_bytes = 0;
        li->li_block    = NULL;
-       inode->i_uid    = 0;
-       inode->i_gid    = 0;
+       i_uid_write(inode, 0);
+       i_gid_write(inode, 0);
        inode->i_size   = 0;
        inode->i_blocks = 0;
        inode->i_ctime  = CURRENT_TIME;
@@ -417,5 +417,10 @@ int logfs_init_inode_cache(void)
 
 void logfs_destroy_inode_cache(void)
 {
+       /*
+        * Make sure all delayed rcu free inodes are flushed before we
+        * destroy cache.
+        */
+       rcu_barrier();
        kmem_cache_destroy(logfs_inode_cache);
 }