Message ID | 20180817140531.32389-1-cgxu519@gmx.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ceph: remove unnecessary assignment | expand |
On Fri, Aug 17, 2018 at 10:07 PM Chengguang Xu <cgxu519@gmx.com> wrote: > > ceph_pagelist_encode_string() will not fail in reserved case, > also, we do not check err code here, so remove unnecessary > assignment. > > Signed-off-by: Chengguang Xu <cgxu519@gmx.com> > --- > fs/ceph/acl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/ceph/acl.c b/fs/ceph/acl.c > index 027408d55aee..6fe4d2f1e4b2 100644 > --- a/fs/ceph/acl.c > +++ b/fs/ceph/acl.c > @@ -236,8 +236,8 @@ int ceph_pre_init_acls(struct inode *dir, umode_t *mode, > err = ceph_pagelist_reserve(pagelist, len + val_size2 + 8); > if (err) > goto out_err; > - err = ceph_pagelist_encode_string(pagelist, > - XATTR_NAME_POSIX_ACL_DEFAULT, len); > + ceph_pagelist_encode_string(pagelist, > + XATTR_NAME_POSIX_ACL_DEFAULT, len); > err = posix_acl_to_xattr(&init_user_ns, default_acl, > tmp_buf, val_size2); > if (err < 0) > -- > 2.17.1 > Applied, Thanks Yan, Zheng
diff --git a/fs/ceph/acl.c b/fs/ceph/acl.c index 027408d55aee..6fe4d2f1e4b2 100644 --- a/fs/ceph/acl.c +++ b/fs/ceph/acl.c @@ -236,8 +236,8 @@ int ceph_pre_init_acls(struct inode *dir, umode_t *mode, err = ceph_pagelist_reserve(pagelist, len + val_size2 + 8); if (err) goto out_err; - err = ceph_pagelist_encode_string(pagelist, - XATTR_NAME_POSIX_ACL_DEFAULT, len); + ceph_pagelist_encode_string(pagelist, + XATTR_NAME_POSIX_ACL_DEFAULT, len); err = posix_acl_to_xattr(&init_user_ns, default_acl, tmp_buf, val_size2); if (err < 0)
ceph_pagelist_encode_string() will not fail in reserved case, also, we do not check err code here, so remove unnecessary assignment. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> --- fs/ceph/acl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)