acl.c (38d46409c4639a1d659ebfa70e27a8bed6b8ee1d) acl.c (79c66a0c8c4a5d341e948dd6a41111957b315f20)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * linux/fs/ceph/acl.c
4 *
5 * Copyright (C) 2013 Guangliang Zhao, <lucienchao@gmail.com>
6 */
7
8#include <linux/ceph/ceph_debug.h>

--- 128 unchanged lines hidden (view full) ---

137 if (ret < 0)
138 goto out_free;
139 }
140
141 if (new_mode != old_mode) {
142 newattrs.ia_ctime = current_time(inode);
143 newattrs.ia_mode = new_mode;
144 newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * linux/fs/ceph/acl.c
4 *
5 * Copyright (C) 2013 Guangliang Zhao, <lucienchao@gmail.com>
6 */
7
8#include <linux/ceph/ceph_debug.h>

--- 128 unchanged lines hidden (view full) ---

137 if (ret < 0)
138 goto out_free;
139 }
140
141 if (new_mode != old_mode) {
142 newattrs.ia_ctime = current_time(inode);
143 newattrs.ia_mode = new_mode;
144 newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
145 ret = __ceph_setattr(inode, &newattrs, NULL);
145 ret = __ceph_setattr(idmap, inode, &newattrs, NULL);
146 if (ret)
147 goto out_free;
148 }
149
150 ret = __ceph_setxattr(inode, name, value, size, 0);
151 if (ret) {
152 if (new_mode != old_mode) {
153 newattrs.ia_ctime = old_ctime;
154 newattrs.ia_mode = old_mode;
155 newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
146 if (ret)
147 goto out_free;
148 }
149
150 ret = __ceph_setxattr(inode, name, value, size, 0);
151 if (ret) {
152 if (new_mode != old_mode) {
153 newattrs.ia_ctime = old_ctime;
154 newattrs.ia_mode = old_mode;
155 newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
156 __ceph_setattr(inode, &newattrs, NULL);
156 __ceph_setattr(idmap, inode, &newattrs, NULL);
157 }
158 goto out_free;
159 }
160
161 ceph_set_cached_acl(inode, type, acl);
162
163out_free:
164 kfree(value);

--- 101 unchanged lines hidden ---
157 }
158 goto out_free;
159 }
160
161 ceph_set_cached_acl(inode, type, acl);
162
163out_free:
164 kfree(value);

--- 101 unchanged lines hidden ---