diff options
Diffstat (limited to 'fs/cifs/xattr.c')
-rw-r--r-- | fs/cifs/xattr.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 95c43bb20335..5ac836a86b18 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c | |||
@@ -176,8 +176,12 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name, | |||
176 | rc = -ENOMEM; | 176 | rc = -ENOMEM; |
177 | } else { | 177 | } else { |
178 | memcpy(pacl, ea_value, value_size); | 178 | memcpy(pacl, ea_value, value_size); |
179 | rc = set_cifs_acl(pacl, value_size, | 179 | if (pTcon->ses->server->ops->set_acl) |
180 | direntry->d_inode, full_path, CIFS_ACL_DACL); | 180 | rc = pTcon->ses->server->ops->set_acl(pacl, |
181 | value_size, direntry->d_inode, | ||
182 | full_path, CIFS_ACL_DACL); | ||
183 | else | ||
184 | rc = -EOPNOTSUPP; | ||
181 | if (rc == 0) /* force revalidate of the inode */ | 185 | if (rc == 0) /* force revalidate of the inode */ |
182 | CIFS_I(direntry->d_inode)->time = 0; | 186 | CIFS_I(direntry->d_inode)->time = 0; |
183 | kfree(pacl); | 187 | kfree(pacl); |
@@ -323,8 +327,11 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, | |||
323 | u32 acllen; | 327 | u32 acllen; |
324 | struct cifs_ntsd *pacl; | 328 | struct cifs_ntsd *pacl; |
325 | 329 | ||
326 | pacl = get_cifs_acl(cifs_sb, direntry->d_inode, | 330 | if (pTcon->ses->server->ops->get_acl == NULL) |
327 | full_path, &acllen); | 331 | goto get_ea_exit; /* rc already EOPNOTSUPP */ |
332 | |||
333 | pacl = pTcon->ses->server->ops->get_acl(cifs_sb, | ||
334 | direntry->d_inode, full_path, &acllen); | ||
328 | if (IS_ERR(pacl)) { | 335 | if (IS_ERR(pacl)) { |
329 | rc = PTR_ERR(pacl); | 336 | rc = PTR_ERR(pacl); |
330 | cifs_dbg(VFS, "%s: error %zd getting sec desc\n", | 337 | cifs_dbg(VFS, "%s: error %zd getting sec desc\n", |