Skip to content

Commit

Permalink
nilfs2_permission() doesn't need to bail out in RCU mode
Browse files Browse the repository at this point in the history
Nothing blocking except for generic_permission().  Which will DTRT.

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Jun 20, 2011
1 parent a63ab94 commit 730e908
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fs/nilfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,12 +801,7 @@ int nilfs_setattr(struct dentry *dentry, struct iattr *iattr)

int nilfs_permission(struct inode *inode, int mask, unsigned int flags)
{
struct nilfs_root *root;

if (flags & IPERM_FLAG_RCU)
return -ECHILD;

root = NILFS_I(inode)->i_root;
struct nilfs_root *root = NILFS_I(inode)->i_root;
if ((mask & MAY_WRITE) && root &&
root->cno != NILFS_CPTREE_CURRENT_CNO)
return -EROFS; /* snapshot is not writable */
Expand Down

0 comments on commit 730e908

Please sign in to comment.