}
key_put(key);
- ret = generic_permission(inode, mask, flags);
+ ret = generic_permission(inode, mask);
_leave(" = %d", ret);
return ret;
return -EROFS;
if ((BTRFS_I(inode)->flags & BTRFS_INODE_READONLY) && (mask & MAY_WRITE))
return -EACCES;
- return generic_permission(inode, mask, flags);
+ return generic_permission(inode, mask);
}
static const struct inode_operations btrfs_dir_inode_operations = {
err = ceph_do_getattr(inode, CEPH_CAP_AUTH_SHARED);
if (!err)
- err = generic_permission(inode, mask, flags);
+ err = generic_permission(inode, mask);
return err;
}
on the client (above and beyond ACL on servers) for
servers which do not support setting and viewing mode bits,
so allowing client to check permissions is useful */
- return generic_permission(inode, mask, flags);
+ return generic_permission(inode, mask);
}
static struct kmem_cache *cifs_inode_cachep;
}
if (fc->flags & FUSE_DEFAULT_PERMISSIONS) {
- err = generic_permission(inode, mask, flags);
+ err = generic_permission(inode, mask);
/* If permission is denied, try to refresh file
attributes. This is also needed, because the root
if (err == -EACCES && !refreshed) {
err = fuse_perm_getattr(inode, flags);
if (!err)
- err = generic_permission(inode, mask,
- flags);
+ err = generic_permission(inode, mask);
}
/* Note: the opposite of the above test does not
if ((mask & MAY_WRITE) && IS_IMMUTABLE(inode))
error = -EACCES;
else
- error = generic_permission(inode, mask, flags);
+ error = generic_permission(inode, mask);
if (unlock)
gfs2_glock_dq_uninit(&i_gh);
err = access_file(name, r, w, x);
__putname(name);
if (!err)
- err = generic_permission(ino, desired, flags);
+ err = generic_permission(ino, desired);
return err;
}
hpfs_unlock(dir->i_sb);
return -ENOSPC;
}
- if (generic_permission(inode, MAY_WRITE, 0) ||
+ if (generic_permission(inode, MAY_WRITE) ||
!S_ISREG(inode->i_mode) ||
get_write_access(inode)) {
d_rehash(dentry);
* request cannot be satisfied (eg. requires blocking or too much complexity).
* It would then be called again in ref-walk mode.
*/
-int generic_permission(struct inode *inode, int mask, unsigned int flags)
+int generic_permission(struct inode *inode, int mask)
{
int ret;
if (inode->i_op->permission)
retval = inode->i_op->permission(inode, mask, 0);
else
- retval = generic_permission(inode, mask, 0);
+ retval = generic_permission(inode, mask);
if (retval)
return retval;
out_notsup:
res = nfs_revalidate_inode(NFS_SERVER(inode), inode);
if (res == 0)
- res = generic_permission(inode, mask, flags);
+ res = generic_permission(inode, mask);
goto out;
}
root->cno != NILFS_CPTREE_CURRENT_CNO)
return -EROFS; /* snapshot is not writable */
- return generic_permission(inode, mask, flags);
+ return generic_permission(inode, mask);
}
int nilfs_load_inode_block(struct inode *inode, struct buffer_head **pbh)
goto out;
}
- ret = generic_permission(inode, mask, flags);
+ ret = generic_permission(inode, mask);
ocfs2_inode_unlock(inode, 0);
out:
*/
static int proc_fd_permission(struct inode *inode, int mask, unsigned int flags)
{
- int rv = generic_permission(inode, mask, flags);
+ int rv = generic_permission(inode, mask);
if (rv == 0)
return 0;
if (task_pid(current) == proc_pid(inode))
if (IS_PRIVATE(inode))
return 0;
- return generic_permission(inode, mask, flags);
+ return generic_permission(inode, mask);
}
static int xattr_hide_revalidate(struct dentry *dentry, struct nameidata *nd)
sysfs_refresh_inode(sd, inode);
mutex_unlock(&sysfs_mutex);
- return generic_permission(inode, mask, flags);
+ return generic_permission(inode, mask);
}
#endif
extern int notify_change(struct dentry *, struct iattr *);
extern int inode_permission(struct inode *, int);
-extern int generic_permission(struct inode *, int, unsigned int);
+extern int generic_permission(struct inode *, int);
static inline bool execute_ok(struct inode *inode)
{