orangefs: remove inode->i_lock wrapper
authorMartin Brandenburg <martin@omnibond.com>
Mon, 14 Mar 2016 20:59:38 +0000 (16:59 -0400)
committerMike Marshall <hubcap@omnibond.com>
Wed, 23 Mar 2016 21:36:13 +0000 (17:36 -0400)
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/orangefs-kernel.h
fs/orangefs/orangefs-utils.c

index 045e493ab033974e54919d01900e261896b90fed..7846298707177ee6f86e0fbc9dbf6f39db9a173a 100644 (file)
@@ -632,9 +632,6 @@ do {                                                                        \
        spin_unlock(&orangefs_superblocks_lock);                                \
 } while (0)
 
-#define orangefs_lock_inode(inode) spin_lock(&inode->i_lock)
-#define orangefs_unlock_inode(inode) spin_unlock(&inode->i_lock)
-
 #define fill_default_sys_attrs(sys_attr, type, mode)                   \
 do {                                                                   \
        sys_attr.owner = from_kuid(current_user_ns(), current_fsuid()); \
index 8ef9e9646748e945046f13a1b9ff869c38cbeb40..df4ad04407e2f7b7b8c6a86c2e143d08784f8877 100644 (file)
@@ -170,11 +170,11 @@ static int copy_attributes_to_inode(struct inode *inode,
                        rounded_up_size =
                            (inode_size + (4096 - (inode_size % 4096)));
 
-                       orangefs_lock_inode(inode);
+                       spin_lock(&inode->i_lock);
                        inode->i_bytes = inode_size;
                        inode->i_blocks =
                            (unsigned long)(rounded_up_size / 512);
-                       orangefs_unlock_inode(inode);
+                       spin_unlock(&inode->i_lock);
 
                        /*
                         * NOTE: make sure all the places we're called
@@ -194,9 +194,9 @@ static int copy_attributes_to_inode(struct inode *inode,
        default:
                inode->i_size = PAGE_CACHE_SIZE;
 
-               orangefs_lock_inode(inode);
+               spin_lock(&inode->i_lock);
                inode_set_bytes(inode, inode->i_size);
-               orangefs_unlock_inode(inode);
+               spin_unlock(&inode->i_lock);
                break;
        }