Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 733dbc1b authored by Bob Peterson's avatar Bob Peterson Committed by Steven Whitehouse
Browse files

GFS2: inline function gfs2_set_mode



Here is a revised patch based on Steve's feedback:

This patch eliminates function gfs2_set_mode which was only called in
one place, and always returned 0.

Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent f45dc26d
Loading
Loading
Loading
Loading
+4 −15
Original line number Diff line number Diff line
@@ -64,18 +64,6 @@ struct posix_acl *gfs2_get_acl(struct inode *inode, int type)
	return acl;
}

static int gfs2_set_mode(struct inode *inode, umode_t mode)
{
	int error = 0;

	if (mode != inode->i_mode) {
		inode->i_mode = mode;
		mark_inode_dirty(inode);
	}

	return error;
}

int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
{
	int error;
@@ -98,9 +86,10 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
		if (error == 0)
			acl = NULL;

		error = gfs2_set_mode(inode, mode);
		if (error)
			return error;
		if (mode != inode->i_mode) {
			inode->i_mode = mode;
			mark_inode_dirty(inode);
		}
	}

	if (acl) {