* [Cluster-devel] [GFS2 PATCH] GFS2: Eliminate always-0 return from gfs2_set_mode
[not found] <1051482030.2085840.1395243027100.JavaMail.zimbra@redhat.com>
@ 2014-03-19 15:31 ` Bob Peterson
2014-03-19 15:35 ` Steven Whitehouse
0 siblings, 1 reply; 2+ messages in thread
From: Bob Peterson @ 2014-03-19 15:31 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
This patch eliminates a return code from function gfs2_set_mode that
was always 0. We could also just eliminate the function altogether
because after the recent acl reforms, it's only called in one place.
Regards,
Bob Peterson
Red Hat File Systems
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c
index 394dc55..568f650 100644
--- a/fs/gfs2/acl.c
+++ b/fs/gfs2/acl.c
@@ -64,16 +64,12 @@ struct posix_acl *gfs2_get_acl(struct inode *inode, int type)
return acl;
}
-static int gfs2_set_mode(struct inode *inode, umode_t mode)
+static void 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)
@@ -98,9 +94,7 @@ 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;
+ gfs2_set_mode(inode, mode);
}
if (acl) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] [GFS2 PATCH] GFS2: Eliminate always-0 return from gfs2_set_mode
2014-03-19 15:31 ` [Cluster-devel] [GFS2 PATCH] GFS2: Eliminate always-0 return from gfs2_set_mode Bob Peterson
@ 2014-03-19 15:35 ` Steven Whitehouse
0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2014-03-19 15:35 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Yes, I think we might as well just merge it in, if there is only one
caller,
Steve.
On Wed, 2014-03-19 at 11:31 -0400, Bob Peterson wrote:
> Hi,
>
> This patch eliminates a return code from function gfs2_set_mode that
> was always 0. We could also just eliminate the function altogether
> because after the recent acl reforms, it's only called in one place.
>
> Regards,
>
> Bob Peterson
> Red Hat File Systems
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> ---
> diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c
> index 394dc55..568f650 100644
> --- a/fs/gfs2/acl.c
> +++ b/fs/gfs2/acl.c
> @@ -64,16 +64,12 @@ struct posix_acl *gfs2_get_acl(struct inode *inode, int type)
> return acl;
> }
>
> -static int gfs2_set_mode(struct inode *inode, umode_t mode)
> +static void 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)
> @@ -98,9 +94,7 @@ 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;
> + gfs2_set_mode(inode, mode);
> }
>
> if (acl) {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-19 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1051482030.2085840.1395243027100.JavaMail.zimbra@redhat.com>
2014-03-19 15:31 ` [Cluster-devel] [GFS2 PATCH] GFS2: Eliminate always-0 return from gfs2_set_mode Bob Peterson
2014-03-19 15:35 ` Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).