Unionfs: don't purge lower sb data on remount
authorErez Zadok <ezk@cs.sunysb.edu>
Mon, 31 Mar 2008 23:09:23 +0000 (19:09 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Sat, 19 Jul 2008 03:22:57 +0000 (23:22 -0400)
This is no longer needed, as we don't have upper and lower pages.  Plus this
was racy, requiring the unexported inode_lock variable.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/dentry.c
fs/unionfs/super.c

index 5e498c2c861eefab6059229d7744cdf71488b07f..ee0da4f45e9019cb085a6aec33abdd8e69ba590e 100644 (file)
@@ -273,17 +273,6 @@ static inline void purge_inode_data(struct inode *inode)
         */
 }
 
-void purge_sb_data(struct super_block *sb)
-{
-       struct inode *inode;
-
-       list_for_each_entry(inode, &sb->s_inodes, i_sb_list) {
-               if (inode->i_state & (I_FREEING|I_WILL_FREE))
-                       continue;
-               purge_inode_data(inode);
-       }
-}
-
 /*
  * Revalidate a single file/symlink/special dentry.  Assume that info nodes
  * of the dentry and its parent are locked.  Assume that parent(s) are all
index 0b54a9d4edc54277d44c594a689edff20b0d9cb5..f9325eae0fc4e7b020591f4db49671f47ce0a1cf 100644 (file)
@@ -737,10 +737,12 @@ out_no_change:
         * function).  This revalidation will happen lazily and
         * incrementally, as users perform operations on cached inodes.  We
         * would like to encourage this revalidation to happen sooner if
-        * possible, so we try to invalidate as many other pages in our
-        * superblock as we can.
+        * possible, so we like to try to invalidate as many other pages in
+        * our superblock as we can.  We used to call drop_pagecache_sb() or
+        * a variant thereof, but either method was racy (drop_caches alone
+        * is known to be racy).  So now we let the revalidation happen on a
+        * per file basis in ->d_revalidate.
         */
-       purge_sb_data(sb);
 
        /* grab new lower super references; release old ones */
        for (i = 0; i < new_branches; i++)