Skip to content

Commit

Permalink
orangefs: remove inode->i_lock wrapper
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Brandenburg <[email protected]>
Signed-off-by: Mike Marshall <[email protected]>
  • Loading branch information
Martin Brandenburg authored and hubcapsc committed Mar 23, 2016
1 parent 2f83ace commit d57521a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions fs/orangefs/orangefs-kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()); \
Expand Down
8 changes: 4 additions & 4 deletions fs/orangefs/orangefs-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}

Expand Down

0 comments on commit d57521a

Please sign in to comment.