]> Pileus Git - ~andy/linux/blobdiff - fs/ext3/super.c
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
[~andy/linux] / fs / ext3 / super.c
index 8c892e93d8e7b6f2ff727709619eedde0e880812..17ae5c83d2346353272fb0c42ed52f1a20aa3c70 100644 (file)
@@ -532,6 +532,11 @@ static int init_inodecache(void)
 
 static void destroy_inodecache(void)
 {
+       /*
+        * Make sure all delayed rcu free inodes are flushed before we
+        * destroy cache.
+        */
+       rcu_barrier();
        kmem_cache_destroy(ext3_inode_cachep);
 }
 
@@ -975,7 +980,7 @@ static int parse_options (char *options, struct super_block *sb,
                 * Initialize args struct so we know whether arg was
                 * found; some options take optional arguments.
                 */
-               args[0].to = args[0].from = 0;
+               args[0].to = args[0].from = NULL;
                token = match_token(p, tokens, args);
                switch (token) {
                case Opt_bsd_df:
@@ -1479,10 +1484,12 @@ static void ext3_orphan_cleanup (struct super_block * sb,
        }
 
        if (EXT3_SB(sb)->s_mount_state & EXT3_ERROR_FS) {
-               if (es->s_last_orphan)
+               /* don't clear list on RO mount w/ errors */
+               if (es->s_last_orphan && !(s_flags & MS_RDONLY)) {
                        jbd_debug(1, "Errors on filesystem, "
                                  "clearing orphan list.\n");
-               es->s_last_orphan = 0;
+                       es->s_last_orphan = 0;
+               }
                jbd_debug(1, "Skipping orphan recovery on fs with errors.\n");
                return;
        }
@@ -2803,7 +2810,7 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
 
 static inline struct inode *dquot_to_inode(struct dquot *dquot)
 {
-       return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
+       return sb_dqopt(dquot->dq_sb)->files[dquot->dq_id.type];
 }
 
 static int ext3_write_dquot(struct dquot *dquot)