Unionfs: remove unnecessary lock in read_inode
authorErez Zadok <ezk@cs.sunysb.edu>
Thu, 10 Jan 2008 11:59:57 +0000 (06:59 -0500)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Thu, 1 May 2008 23:03:30 +0000 (19:03 -0400)
Our read_inode doesn't need to grab the superblock rwsem because there no
chance it could be affected by branch management.  But our read_inode was
called from other places which did grab need to grab that rwsem, and lockdep
complained.

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

index 8fdf7ab4fcc2574b66d2396e11dc14e98fc81871..5df95d5166826b1a856f1aae4b03c6215899c83c 100644 (file)
@@ -29,8 +29,6 @@ static void unionfs_read_inode(struct inode *inode)
        int size;
        struct unionfs_inode_info *info = UNIONFS_I(inode);
 
-       unionfs_read_lock(inode->i_sb);
-
        memset(info, 0, offsetof(struct unionfs_inode_info, vfs_inode));
        info->bstart = -1;
        info->bend = -1;
@@ -61,7 +59,6 @@ static void unionfs_read_inode(struct inode *inode)
        inode->i_mtime.tv_sec = inode->i_mtime.tv_nsec = 0;
        inode->i_ctime.tv_sec = inode->i_ctime.tv_nsec = 0;
 
-       unionfs_read_unlock(inode->i_sb);
 }
 
 /*