fuse: get rid of fc->flags
Only two flags: "default_permissions" and "allow_other". All other flags are handled via bitfields. So convert these two as well. They don't change during the lifetime of the filesystem, so this is quite safe. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
@@ -1028,7 +1028,7 @@ int fuse_allow_current_process(struct fuse_conn *fc)
|
||||
{
|
||||
const struct cred *cred;
|
||||
|
||||
if (fc->flags & FUSE_ALLOW_OTHER)
|
||||
if (fc->allow_other)
|
||||
return 1;
|
||||
|
||||
cred = current_cred();
|
||||
@@ -1104,7 +1104,7 @@ static int fuse_permission(struct inode *inode, int mask)
|
||||
/*
|
||||
* If attributes are needed, refresh them before proceeding
|
||||
*/
|
||||
if ((fc->flags & FUSE_DEFAULT_PERMISSIONS) ||
|
||||
if (fc->default_permissions ||
|
||||
((mask & MAY_EXEC) && S_ISREG(inode->i_mode))) {
|
||||
struct fuse_inode *fi = get_fuse_inode(inode);
|
||||
|
||||
@@ -1117,7 +1117,7 @@ static int fuse_permission(struct inode *inode, int mask)
|
||||
}
|
||||
}
|
||||
|
||||
if (fc->flags & FUSE_DEFAULT_PERMISSIONS) {
|
||||
if (fc->default_permissions) {
|
||||
err = generic_permission(inode, mask);
|
||||
|
||||
/* If permission is denied, try to refresh file
|
||||
@@ -1618,7 +1618,7 @@ int fuse_do_setattr(struct inode *inode, struct iattr *attr,
|
||||
int err;
|
||||
bool trust_local_cmtime = is_wb && S_ISREG(inode->i_mode);
|
||||
|
||||
if (!(fc->flags & FUSE_DEFAULT_PERMISSIONS))
|
||||
if (!fc->default_permissions)
|
||||
attr->ia_valid |= ATTR_FORCE;
|
||||
|
||||
err = inode_change_ok(inode, attr);
|
||||
|
Reference in New Issue
Block a user