commit 27b0e9da4688d7e049a8996cbc7ae8117a478209
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date:   Wed Apr 11 16:38:57 2007 -0400

    cleanup thread to print warning only once

diff --git a/fs/unionfs/dirhelper.c b/fs/unionfs/dirhelper.c
index 740a823..7bf3822 100644
--- a/fs/unionfs/dirhelper.c
+++ b/fs/unionfs/dirhelper.c
@@ -956,6 +956,8 @@ out:
  *     ODF_CLEAN_CACHE: cleans all the dir caches
  *     ODF_CLEAN_BLOCKS: clean until size blocks are freed
  *     ODF_CLEAN_INODES: clean until size inodes are freed
+ * Returns 1 if it manages to bring inodes/block below requested, 
+ * threshold and 0 if not.
  */
 int odf_cleanup(struct odf_sb_info *odf, int mode, u64 size)
 {
@@ -1070,12 +1072,10 @@ cleanup_loop:
                        stack.item[stack.n++] = odf->odi_rc->dentry;
                        goto cleanup_loop;
                }
-               else if (mode == ODF_CLEAN_BLOCKS)
-                       printk("unionfs: Failed to bring free odf data blocks 
below threshold\n");
-               else if (mode == ODF_CLEAN_INODES)
-                       printk("unionfs: Failed to bring free odf inodes below 
threshold\n");
        }
-       
+
+       if (mode == ODF_CLEAN_ALL)
+               success = 1;
 
 out:
        BUG_ON(stack.n < 0);
@@ -1084,6 +1084,8 @@ out:
        
        kfree(buf);
        kfree(stack.item);
+       if (!err)
+               err = success;
        return err;
 }
 
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to