Skip to content

Commit 730e908

Browse files
author
Al Viro
committed
nilfs2_permission() doesn't need to bail out in RCU mode
Nothing blocking except for generic_permission(). Which will DTRT. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent a63ab94 commit 730e908

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎fs/nilfs2/inode.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -801,12 +801,7 @@ int nilfs_setattr(struct dentry *dentry, struct iattr *iattr)
801801

802802
int nilfs_permission(struct inode *inode, int mask, unsigned int flags)
803803
{
804-
struct nilfs_root *root;
805-
806-
if (flags & IPERM_FLAG_RCU)
807-
return -ECHILD;
808-
809-
root = NILFS_I(inode)->i_root;
804+
struct nilfs_root *root = NILFS_I(inode)->i_root;
810805
if ((mask & MAY_WRITE) && root &&
811806
root->cno != NILFS_CPTREE_CURRENT_CNO)
812807
return -EROFS; /* snapshot is not writable */

0 commit comments

Comments
 (0)