aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/xattr.c')
-rw-r--r--fs/cifs/xattr.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index 549afa184fd6..9a41bee11c5a 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -161,18 +161,20 @@ int cifs_setxattr(struct dentry * direntry, const char * ea_name,
161 strlen(POSIX_ACL_XATTR_ACCESS)); 161 strlen(POSIX_ACL_XATTR_ACCESS));
162 if (temp == 0) { 162 if (temp == 0) {
163#ifdef CONFIG_CIFS_POSIX 163#ifdef CONFIG_CIFS_POSIX
164 rc = CIFSSMBSetPosixACL(xid, pTcon,full_path,ea_value, 164 if(sb->s_flags & MS_POSIXACL)
165 (const int)value_size, ACL_TYPE_ACCESS, 165 rc = CIFSSMBSetPosixACL(xid, pTcon,full_path,
166 cifs_sb->local_nls); 166 ea_value, (const int)value_size,
167 ACL_TYPE_ACCESS,cifs_sb->local_nls);
167 cFYI(1,("set POSIX ACL rc %d",rc)); 168 cFYI(1,("set POSIX ACL rc %d",rc));
168#else 169#else
169 cFYI(1,("set POSIX ACL not supported")); 170 cFYI(1,("set POSIX ACL not supported"));
170#endif 171#endif
171 } else if(strncmp(ea_name,POSIX_ACL_XATTR_DEFAULT,strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { 172 } else if(strncmp(ea_name,POSIX_ACL_XATTR_DEFAULT,strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) {
172#ifdef CONFIG_CIFS_POSIX 173#ifdef CONFIG_CIFS_POSIX
173 rc = CIFSSMBSetPosixACL(xid, pTcon,full_path,ea_value, 174 if(sb->s_flags & MS_POSIXACL)
174 (const int)value_size, ACL_TYPE_DEFAULT, 175 rc = CIFSSMBSetPosixACL(xid, pTcon,full_path,
175 cifs_sb->local_nls); 176 ea_value, (const int)value_size,
177 ACL_TYPE_DEFAULT, cifs_sb->local_nls);
176 cFYI(1,("set POSIX default ACL rc %d",rc)); 178 cFYI(1,("set POSIX default ACL rc %d",rc));
177#else 179#else
178 cFYI(1,("set default POSIX ACL not supported")); 180 cFYI(1,("set default POSIX ACL not supported"));
@@ -248,7 +250,8 @@ ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name,
248 buf_size, cifs_sb->local_nls); 250 buf_size, cifs_sb->local_nls);
249 } else if(strncmp(ea_name,POSIX_ACL_XATTR_ACCESS,strlen(POSIX_ACL_XATTR_ACCESS)) == 0) { 251 } else if(strncmp(ea_name,POSIX_ACL_XATTR_ACCESS,strlen(POSIX_ACL_XATTR_ACCESS)) == 0) {
250#ifdef CONFIG_CIFS_POSIX 252#ifdef CONFIG_CIFS_POSIX
251 rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, 253 if(sb->s_flags & MS_POSIXACL)
254 rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
252 ea_value, buf_size, ACL_TYPE_ACCESS, 255 ea_value, buf_size, ACL_TYPE_ACCESS,
253 cifs_sb->local_nls); 256 cifs_sb->local_nls);
254#else 257#else
@@ -256,7 +259,8 @@ ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name,
256#endif /* CONFIG_CIFS_POSIX */ 259#endif /* CONFIG_CIFS_POSIX */
257 } else if(strncmp(ea_name,POSIX_ACL_XATTR_DEFAULT,strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { 260 } else if(strncmp(ea_name,POSIX_ACL_XATTR_DEFAULT,strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) {
258#ifdef CONFIG_CIFS_POSIX 261#ifdef CONFIG_CIFS_POSIX
259 rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, 262 if(sb->s_flags & MS_POSIXACL)
263 rc = CIFSSMBGetPosixACL(xid, pTcon, full_path,
260 ea_value, buf_size, ACL_TYPE_DEFAULT, 264 ea_value, buf_size, ACL_TYPE_DEFAULT,
261 cifs_sb->local_nls); 265 cifs_sb->local_nls);
262#else 266#else