GIT: unionfs2-2.6.27.y: Unionfs: use locking around i_size_write in 32-bit systems

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:17:33 EDT 2010


commit 040cb428d85d1bef72cd3a820f42e699b5c3101b
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date:   Fri Dec 21 00:27:47 2007 -0500

    Unionfs: use locking around i_size_write in 32-bit systems
    
    CC: Hugh Dickins <hugh at veritas.com>
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>

diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index 0ff9a9e..ed3eb04 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -69,7 +69,13 @@ static void unionfs_read_inode(struct inode *inode)
  */
 static void unionfs_delete_inode(struct inode *inode)
 {
+#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
+	spin_lock(&inode->i_lock);
+#endif
 	i_size_write(inode, 0);	/* every f/s seems to do that */
+#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
+	spin_unlock(&inode->i_lock);
+#endif
 
 	if (inode->i_data.nrpages)
 		truncate_inode_pages(&inode->i_data, 0);


More information about the unionfs-cvs mailing list