diff options
author | Steve French <sfrench@us.ibm.com> | 2007-07-06 18:44:50 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-07-06 18:44:50 -0400 |
commit | 79a58d1f6075bc0029c38836be9790917a69a342 (patch) | |
tree | 88159126918cbe653cac62725237e2e9fd7f4b0c /fs/cifs/xattr.c | |
parent | d20acd09e3bf89aa23af034b8c2d0f5653577ea9 (diff) |
[CIFS] whitespace cleanup
checkpatch.pl redux
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/xattr.c')
-rw-r--r-- | fs/cifs/xattr.c | 226 |
1 files changed, 115 insertions, 111 deletions
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 18fcec190f8b..5c4cf2926849 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * fs/cifs/xattr.c | 2 | * fs/cifs/xattr.c |
3 | * | 3 | * |
4 | * Copyright (c) International Business Machines Corp., 2003 | 4 | * Copyright (c) International Business Machines Corp., 2003, 2007 |
5 | * Author(s): Steve French (sfrench@us.ibm.com) | 5 | * Author(s): Steve French (sfrench@us.ibm.com) |
6 | * | 6 | * |
7 | * This library is free software; you can redistribute it and/or modify | 7 | * This library is free software; you can redistribute it and/or modify |
@@ -40,47 +40,49 @@ | |||
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | int cifs_removexattr(struct dentry * direntry, const char * ea_name) | 43 | int cifs_removexattr(struct dentry *direntry, const char *ea_name) |
44 | { | 44 | { |
45 | int rc = -EOPNOTSUPP; | 45 | int rc = -EOPNOTSUPP; |
46 | #ifdef CONFIG_CIFS_XATTR | 46 | #ifdef CONFIG_CIFS_XATTR |
47 | int xid; | 47 | int xid; |
48 | struct cifs_sb_info *cifs_sb; | 48 | struct cifs_sb_info *cifs_sb; |
49 | struct cifsTconInfo *pTcon; | 49 | struct cifsTconInfo *pTcon; |
50 | struct super_block * sb; | 50 | struct super_block *sb; |
51 | char * full_path; | 51 | char *full_path; |
52 | 52 | ||
53 | if(direntry == NULL) | 53 | if (direntry == NULL) |
54 | return -EIO; | 54 | return -EIO; |
55 | if(direntry->d_inode == NULL) | 55 | if (direntry->d_inode == NULL) |
56 | return -EIO; | 56 | return -EIO; |
57 | sb = direntry->d_inode->i_sb; | 57 | sb = direntry->d_inode->i_sb; |
58 | if(sb == NULL) | 58 | if (sb == NULL) |
59 | return -EIO; | 59 | return -EIO; |
60 | xid = GetXid(); | 60 | xid = GetXid(); |
61 | 61 | ||
62 | cifs_sb = CIFS_SB(sb); | 62 | cifs_sb = CIFS_SB(sb); |
63 | pTcon = cifs_sb->tcon; | 63 | pTcon = cifs_sb->tcon; |
64 | 64 | ||
65 | full_path = build_path_from_dentry(direntry); | 65 | full_path = build_path_from_dentry(direntry); |
66 | if(full_path == NULL) { | 66 | if (full_path == NULL) { |
67 | FreeXid(xid); | 67 | FreeXid(xid); |
68 | return -ENOMEM; | 68 | return -ENOMEM; |
69 | } | 69 | } |
70 | if(ea_name == NULL) { | 70 | if (ea_name == NULL) { |
71 | cFYI(1,("Null xattr names not supported")); | 71 | cFYI(1, ("Null xattr names not supported")); |
72 | } else if(strncmp(ea_name,CIFS_XATTR_USER_PREFIX,5) | 72 | } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) |
73 | && (strncmp(ea_name,CIFS_XATTR_OS2_PREFIX,4))) { | 73 | && (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4))) { |
74 | cFYI(1,("illegal xattr namespace %s (only user namespace supported)",ea_name)); | 74 | cFYI(1, |
75 | ("illegal xattr request %s (only user namespace supported)", | ||
76 | ea_name)); | ||
75 | /* BB what if no namespace prefix? */ | 77 | /* BB what if no namespace prefix? */ |
76 | /* Should we just pass them to server, except for | 78 | /* Should we just pass them to server, except for |
77 | system and perhaps security prefixes? */ | 79 | system and perhaps security prefixes? */ |
78 | } else { | 80 | } else { |
79 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | 81 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
80 | goto remove_ea_exit; | 82 | goto remove_ea_exit; |
81 | 83 | ||
82 | ea_name+=5; /* skip past user. prefix */ | 84 | ea_name += 5; /* skip past user. prefix */ |
83 | rc = CIFSSMBSetEA(xid,pTcon,full_path,ea_name,NULL, | 85 | rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, NULL, |
84 | (__u16)0, cifs_sb->local_nls, | 86 | (__u16)0, cifs_sb->local_nls, |
85 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 87 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
86 | } | 88 | } |
@@ -91,23 +93,23 @@ remove_ea_exit: | |||
91 | return rc; | 93 | return rc; |
92 | } | 94 | } |
93 | 95 | ||
94 | int cifs_setxattr(struct dentry * direntry, const char * ea_name, | 96 | int cifs_setxattr(struct dentry *direntry, const char *ea_name, |
95 | const void * ea_value, size_t value_size, int flags) | 97 | const void *ea_value, size_t value_size, int flags) |
96 | { | 98 | { |
97 | int rc = -EOPNOTSUPP; | 99 | int rc = -EOPNOTSUPP; |
98 | #ifdef CONFIG_CIFS_XATTR | 100 | #ifdef CONFIG_CIFS_XATTR |
99 | int xid; | 101 | int xid; |
100 | struct cifs_sb_info *cifs_sb; | 102 | struct cifs_sb_info *cifs_sb; |
101 | struct cifsTconInfo *pTcon; | 103 | struct cifsTconInfo *pTcon; |
102 | struct super_block * sb; | 104 | struct super_block *sb; |
103 | char * full_path; | 105 | char *full_path; |
104 | 106 | ||
105 | if(direntry == NULL) | 107 | if (direntry == NULL) |
106 | return -EIO; | 108 | return -EIO; |
107 | if(direntry->d_inode == NULL) | 109 | if (direntry->d_inode == NULL) |
108 | return -EIO; | 110 | return -EIO; |
109 | sb = direntry->d_inode->i_sb; | 111 | sb = direntry->d_inode->i_sb; |
110 | if(sb == NULL) | 112 | if (sb == NULL) |
111 | return -EIO; | 113 | return -EIO; |
112 | xid = GetXid(); | 114 | xid = GetXid(); |
113 | 115 | ||
@@ -115,7 +117,7 @@ int cifs_setxattr(struct dentry * direntry, const char * ea_name, | |||
115 | pTcon = cifs_sb->tcon; | 117 | pTcon = cifs_sb->tcon; |
116 | 118 | ||
117 | full_path = build_path_from_dentry(direntry); | 119 | full_path = build_path_from_dentry(direntry); |
118 | if(full_path == NULL) { | 120 | if (full_path == NULL) { |
119 | FreeXid(xid); | 121 | FreeXid(xid); |
120 | return -ENOMEM; | 122 | return -ENOMEM; |
121 | } | 123 | } |
@@ -123,67 +125,68 @@ int cifs_setxattr(struct dentry * direntry, const char * ea_name, | |||
123 | /* return alt name if available as pseudo attr */ | 125 | /* return alt name if available as pseudo attr */ |
124 | 126 | ||
125 | /* if proc/fs/cifs/streamstoxattr is set then | 127 | /* if proc/fs/cifs/streamstoxattr is set then |
126 | search server for EAs or streams to | 128 | search server for EAs or streams to |
127 | returns as xattrs */ | 129 | returns as xattrs */ |
128 | if(value_size > MAX_EA_VALUE_SIZE) { | 130 | if (value_size > MAX_EA_VALUE_SIZE) { |
129 | cFYI(1,("size of EA value too large")); | 131 | cFYI(1, ("size of EA value too large")); |
130 | kfree(full_path); | 132 | kfree(full_path); |
131 | FreeXid(xid); | 133 | FreeXid(xid); |
132 | return -EOPNOTSUPP; | 134 | return -EOPNOTSUPP; |
133 | } | 135 | } |
134 | 136 | ||
135 | if(ea_name == NULL) { | 137 | if (ea_name == NULL) { |
136 | cFYI(1,("Null xattr names not supported")); | 138 | cFYI(1, ("Null xattr names not supported")); |
137 | } else if(strncmp(ea_name,CIFS_XATTR_USER_PREFIX,5) == 0) { | 139 | } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) { |
138 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | 140 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
139 | goto set_ea_exit; | 141 | goto set_ea_exit; |
140 | if(strncmp(ea_name,CIFS_XATTR_DOS_ATTRIB,14) == 0) { | 142 | if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) { |
141 | cFYI(1,("attempt to set cifs inode metadata")); | 143 | cFYI(1, ("attempt to set cifs inode metadata")); |
142 | } | 144 | } |
143 | ea_name += 5; /* skip past user. prefix */ | 145 | ea_name += 5; /* skip past user. prefix */ |
144 | rc = CIFSSMBSetEA(xid,pTcon,full_path,ea_name,ea_value, | 146 | rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value, |
145 | (__u16)value_size, cifs_sb->local_nls, | 147 | (__u16)value_size, cifs_sb->local_nls, |
146 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 148 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
147 | } else if(strncmp(ea_name, CIFS_XATTR_OS2_PREFIX,4) == 0) { | 149 | } else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) { |
148 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | 150 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
149 | goto set_ea_exit; | 151 | goto set_ea_exit; |
150 | 152 | ||
151 | ea_name += 4; /* skip past os2. prefix */ | 153 | ea_name += 4; /* skip past os2. prefix */ |
152 | rc = CIFSSMBSetEA(xid,pTcon,full_path,ea_name,ea_value, | 154 | rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value, |
153 | (__u16)value_size, cifs_sb->local_nls, | 155 | (__u16)value_size, cifs_sb->local_nls, |
154 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 156 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
155 | } else { | 157 | } else { |
156 | int temp; | 158 | int temp; |
157 | temp = strncmp(ea_name,POSIX_ACL_XATTR_ACCESS, | 159 | temp = strncmp(ea_name, POSIX_ACL_XATTR_ACCESS, |
158 | strlen(POSIX_ACL_XATTR_ACCESS)); | 160 | strlen(POSIX_ACL_XATTR_ACCESS)); |
159 | if (temp == 0) { | 161 | if (temp == 0) { |
160 | #ifdef CONFIG_CIFS_POSIX | 162 | #ifdef CONFIG_CIFS_POSIX |
161 | if(sb->s_flags & MS_POSIXACL) | 163 | if (sb->s_flags & MS_POSIXACL) |
162 | rc = CIFSSMBSetPosixACL(xid, pTcon,full_path, | 164 | rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, |
163 | ea_value, (const int)value_size, | 165 | ea_value, (const int)value_size, |
164 | ACL_TYPE_ACCESS,cifs_sb->local_nls, | 166 | ACL_TYPE_ACCESS, cifs_sb->local_nls, |
165 | cifs_sb->mnt_cifs_flags & | 167 | cifs_sb->mnt_cifs_flags & |
166 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 168 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
167 | cFYI(1,("set POSIX ACL rc %d",rc)); | 169 | cFYI(1, ("set POSIX ACL rc %d", rc)); |
168 | #else | 170 | #else |
169 | cFYI(1,("set POSIX ACL not supported")); | 171 | cFYI(1, ("set POSIX ACL not supported")); |
170 | #endif | 172 | #endif |
171 | } else if(strncmp(ea_name,POSIX_ACL_XATTR_DEFAULT,strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { | 173 | } else if (strncmp(ea_name, POSIX_ACL_XATTR_DEFAULT, |
174 | strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { | ||
172 | #ifdef CONFIG_CIFS_POSIX | 175 | #ifdef CONFIG_CIFS_POSIX |
173 | if(sb->s_flags & MS_POSIXACL) | 176 | if (sb->s_flags & MS_POSIXACL) |
174 | rc = CIFSSMBSetPosixACL(xid, pTcon,full_path, | 177 | rc = CIFSSMBSetPosixACL(xid, pTcon, full_path, |
175 | ea_value, (const int)value_size, | 178 | ea_value, (const int)value_size, |
176 | ACL_TYPE_DEFAULT, cifs_sb->local_nls, | 179 | ACL_TYPE_DEFAULT, cifs_sb->local_nls, |
177 | cifs_sb->mnt_cifs_flags & | 180 | cifs_sb->mnt_cifs_flags & |
178 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 181 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
179 | cFYI(1,("set POSIX default ACL rc %d",rc)); | 182 | cFYI(1, ("set POSIX default ACL rc %d", rc)); |
180 | #else | 183 | #else |
181 | cFYI(1,("set default POSIX ACL not supported")); | 184 | cFYI(1, ("set default POSIX ACL not supported")); |
182 | #endif | 185 | #endif |
183 | } else { | 186 | } else { |
184 | cFYI(1,("illegal xattr request %s (only user namespace supported)",ea_name)); | 187 | cFYI(1, ("illegal xattr request %s (only user namespace supported)", ea_name)); |
185 | /* BB what if no namespace prefix? */ | 188 | /* BB what if no namespace prefix? */ |
186 | /* Should we just pass them to server, except for | 189 | /* Should we just pass them to server, except for |
187 | system and perhaps security prefixes? */ | 190 | system and perhaps security prefixes? */ |
188 | } | 191 | } |
189 | } | 192 | } |
@@ -195,23 +198,23 @@ set_ea_exit: | |||
195 | return rc; | 198 | return rc; |
196 | } | 199 | } |
197 | 200 | ||
198 | ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name, | 201 | ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name, |
199 | void * ea_value, size_t buf_size) | 202 | void *ea_value, size_t buf_size) |
200 | { | 203 | { |
201 | ssize_t rc = -EOPNOTSUPP; | 204 | ssize_t rc = -EOPNOTSUPP; |
202 | #ifdef CONFIG_CIFS_XATTR | 205 | #ifdef CONFIG_CIFS_XATTR |
203 | int xid; | 206 | int xid; |
204 | struct cifs_sb_info *cifs_sb; | 207 | struct cifs_sb_info *cifs_sb; |
205 | struct cifsTconInfo *pTcon; | 208 | struct cifsTconInfo *pTcon; |
206 | struct super_block * sb; | 209 | struct super_block *sb; |
207 | char * full_path; | 210 | char *full_path; |
208 | 211 | ||
209 | if(direntry == NULL) | 212 | if (direntry == NULL) |
210 | return -EIO; | 213 | return -EIO; |
211 | if(direntry->d_inode == NULL) | 214 | if (direntry->d_inode == NULL) |
212 | return -EIO; | 215 | return -EIO; |
213 | sb = direntry->d_inode->i_sb; | 216 | sb = direntry->d_inode->i_sb; |
214 | if(sb == NULL) | 217 | if (sb == NULL) |
215 | return -EIO; | 218 | return -EIO; |
216 | 219 | ||
217 | xid = GetXid(); | 220 | xid = GetXid(); |
@@ -220,42 +223,42 @@ ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name, | |||
220 | pTcon = cifs_sb->tcon; | 223 | pTcon = cifs_sb->tcon; |
221 | 224 | ||
222 | full_path = build_path_from_dentry(direntry); | 225 | full_path = build_path_from_dentry(direntry); |
223 | if(full_path == NULL) { | 226 | if (full_path == NULL) { |
224 | FreeXid(xid); | 227 | FreeXid(xid); |
225 | return -ENOMEM; | 228 | return -ENOMEM; |
226 | } | 229 | } |
227 | /* return dos attributes as pseudo xattr */ | 230 | /* return dos attributes as pseudo xattr */ |
228 | /* return alt name if available as pseudo attr */ | 231 | /* return alt name if available as pseudo attr */ |
229 | if(ea_name == NULL) { | 232 | if (ea_name == NULL) { |
230 | cFYI(1,("Null xattr names not supported")); | 233 | cFYI(1, ("Null xattr names not supported")); |
231 | } else if(strncmp(ea_name,CIFS_XATTR_USER_PREFIX,5) == 0) { | 234 | } else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) { |
232 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | 235 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
233 | goto get_ea_exit; | 236 | goto get_ea_exit; |
234 | 237 | ||
235 | if(strncmp(ea_name,CIFS_XATTR_DOS_ATTRIB,14) == 0) { | 238 | if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) { |
236 | cFYI(1,("attempt to query cifs inode metadata")); | 239 | cFYI(1, ("attempt to query cifs inode metadata")); |
237 | /* revalidate/getattr then populate from inode */ | 240 | /* revalidate/getattr then populate from inode */ |
238 | } /* BB add else when above is implemented */ | 241 | } /* BB add else when above is implemented */ |
239 | ea_name += 5; /* skip past user. prefix */ | 242 | ea_name += 5; /* skip past user. prefix */ |
240 | rc = CIFSSMBQueryEA(xid,pTcon,full_path,ea_name,ea_value, | 243 | rc = CIFSSMBQueryEA(xid, pTcon, full_path, ea_name, ea_value, |
241 | buf_size, cifs_sb->local_nls, | 244 | buf_size, cifs_sb->local_nls, |
242 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 245 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
243 | } else if(strncmp(ea_name, CIFS_XATTR_OS2_PREFIX,4) == 0) { | 246 | } else if (strncmp(ea_name, CIFS_XATTR_OS2_PREFIX, 4) == 0) { |
244 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | 247 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
245 | goto get_ea_exit; | 248 | goto get_ea_exit; |
246 | 249 | ||
247 | ea_name += 4; /* skip past os2. prefix */ | 250 | ea_name += 4; /* skip past os2. prefix */ |
248 | rc = CIFSSMBQueryEA(xid,pTcon,full_path,ea_name,ea_value, | 251 | rc = CIFSSMBQueryEA(xid, pTcon, full_path, ea_name, ea_value, |
249 | buf_size, cifs_sb->local_nls, | 252 | buf_size, cifs_sb->local_nls, |
250 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | 253 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); |
251 | } else if(strncmp(ea_name,POSIX_ACL_XATTR_ACCESS, | 254 | } else if (strncmp(ea_name, POSIX_ACL_XATTR_ACCESS, |
252 | strlen(POSIX_ACL_XATTR_ACCESS)) == 0) { | 255 | strlen(POSIX_ACL_XATTR_ACCESS)) == 0) { |
253 | #ifdef CONFIG_CIFS_POSIX | 256 | #ifdef CONFIG_CIFS_POSIX |
254 | if(sb->s_flags & MS_POSIXACL) | 257 | if (sb->s_flags & MS_POSIXACL) |
255 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, | 258 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, |
256 | ea_value, buf_size, ACL_TYPE_ACCESS, | 259 | ea_value, buf_size, ACL_TYPE_ACCESS, |
257 | cifs_sb->local_nls, | 260 | cifs_sb->local_nls, |
258 | cifs_sb->mnt_cifs_flags & | 261 | cifs_sb->mnt_cifs_flags & |
259 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 262 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
260 | /* else if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { | 263 | /* else if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { |
261 | __u16 fid; | 264 | __u16 fid; |
@@ -272,39 +275,40 @@ ssize_t cifs_getxattr(struct dentry * direntry, const char * ea_name, | |||
272 | CIFSSMBClose(xid, pTcon, fid); | 275 | CIFSSMBClose(xid, pTcon, fid); |
273 | } | 276 | } |
274 | } */ /* BB enable after fixing up return data */ | 277 | } */ /* BB enable after fixing up return data */ |
275 | 278 | #else | |
276 | #else | 279 | cFYI(1, ("query POSIX ACL not supported yet")); |
277 | cFYI(1,("query POSIX ACL not supported yet")); | ||
278 | #endif /* CONFIG_CIFS_POSIX */ | 280 | #endif /* CONFIG_CIFS_POSIX */ |
279 | } else if(strncmp(ea_name,POSIX_ACL_XATTR_DEFAULT, | 281 | } else if (strncmp(ea_name, POSIX_ACL_XATTR_DEFAULT, |
280 | strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { | 282 | strlen(POSIX_ACL_XATTR_DEFAULT)) == 0) { |
281 | #ifdef CONFIG_CIFS_POSIX | 283 | #ifdef CONFIG_CIFS_POSIX |
282 | if(sb->s_flags & MS_POSIXACL) | 284 | if (sb->s_flags & MS_POSIXACL) |
283 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, | 285 | rc = CIFSSMBGetPosixACL(xid, pTcon, full_path, |
284 | ea_value, buf_size, ACL_TYPE_DEFAULT, | 286 | ea_value, buf_size, ACL_TYPE_DEFAULT, |
285 | cifs_sb->local_nls, | 287 | cifs_sb->local_nls, |
286 | cifs_sb->mnt_cifs_flags & | 288 | cifs_sb->mnt_cifs_flags & |
287 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 289 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
288 | #else | 290 | #else |
289 | cFYI(1,("query POSIX default ACL not supported yet")); | 291 | cFYI(1, ("query POSIX default ACL not supported yet")); |
290 | #endif | 292 | #endif |
291 | } else if(strncmp(ea_name, | 293 | } else if (strncmp(ea_name, |
292 | CIFS_XATTR_TRUSTED_PREFIX,XATTR_TRUSTED_PREFIX_LEN) == 0) { | 294 | CIFS_XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0) { |
293 | cFYI(1,("Trusted xattr namespace not supported yet")); | 295 | cFYI(1, ("Trusted xattr namespace not supported yet")); |
294 | } else if(strncmp(ea_name, | 296 | } else if (strncmp(ea_name, |
295 | CIFS_XATTR_SECURITY_PREFIX,XATTR_SECURITY_PREFIX_LEN) == 0) { | 297 | CIFS_XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) { |
296 | cFYI(1,("Security xattr namespace not supported yet")); | 298 | cFYI(1, ("Security xattr namespace not supported yet")); |
297 | } else { | 299 | } else { |
298 | cFYI(1,("illegal xattr name request %s (only user namespace supported)",ea_name)); | 300 | cFYI(1, |
301 | ("illegal xattr request %s (only user namespace supported)", | ||
302 | ea_name)); | ||
299 | } | 303 | } |
300 | 304 | ||
301 | /* We could add an additional check for streams ie | 305 | /* We could add an additional check for streams ie |
302 | if proc/fs/cifs/streamstoxattr is set then | 306 | if proc/fs/cifs/streamstoxattr is set then |
303 | search server for EAs or streams to | 307 | search server for EAs or streams to |
304 | returns as xattrs */ | 308 | returns as xattrs */ |
305 | 309 | ||
306 | if(rc == -EINVAL) | 310 | if (rc == -EINVAL) |
307 | rc = -EOPNOTSUPP; | 311 | rc = -EOPNOTSUPP; |
308 | 312 | ||
309 | get_ea_exit: | 313 | get_ea_exit: |
310 | kfree(full_path); | 314 | kfree(full_path); |
@@ -313,34 +317,34 @@ get_ea_exit: | |||
313 | return rc; | 317 | return rc; |
314 | } | 318 | } |
315 | 319 | ||
316 | ssize_t cifs_listxattr(struct dentry * direntry, char * data, size_t buf_size) | 320 | ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size) |
317 | { | 321 | { |
318 | ssize_t rc = -EOPNOTSUPP; | 322 | ssize_t rc = -EOPNOTSUPP; |
319 | #ifdef CONFIG_CIFS_XATTR | 323 | #ifdef CONFIG_CIFS_XATTR |
320 | int xid; | 324 | int xid; |
321 | struct cifs_sb_info *cifs_sb; | 325 | struct cifs_sb_info *cifs_sb; |
322 | struct cifsTconInfo *pTcon; | 326 | struct cifsTconInfo *pTcon; |
323 | struct super_block * sb; | 327 | struct super_block *sb; |
324 | char * full_path; | 328 | char *full_path; |
325 | 329 | ||
326 | if(direntry == NULL) | 330 | if (direntry == NULL) |
327 | return -EIO; | 331 | return -EIO; |
328 | if(direntry->d_inode == NULL) | 332 | if (direntry->d_inode == NULL) |
329 | return -EIO; | 333 | return -EIO; |
330 | sb = direntry->d_inode->i_sb; | 334 | sb = direntry->d_inode->i_sb; |
331 | if(sb == NULL) | 335 | if (sb == NULL) |
332 | return -EIO; | 336 | return -EIO; |
333 | 337 | ||
334 | cifs_sb = CIFS_SB(sb); | 338 | cifs_sb = CIFS_SB(sb); |
335 | pTcon = cifs_sb->tcon; | 339 | pTcon = cifs_sb->tcon; |
336 | 340 | ||
337 | if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) | 341 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) |
338 | return -EOPNOTSUPP; | 342 | return -EOPNOTSUPP; |
339 | 343 | ||
340 | xid = GetXid(); | 344 | xid = GetXid(); |
341 | 345 | ||
342 | full_path = build_path_from_dentry(direntry); | 346 | full_path = build_path_from_dentry(direntry); |
343 | if(full_path == NULL) { | 347 | if (full_path == NULL) { |
344 | FreeXid(xid); | 348 | FreeXid(xid); |
345 | return -ENOMEM; | 349 | return -ENOMEM; |
346 | } | 350 | } |
@@ -348,11 +352,11 @@ ssize_t cifs_listxattr(struct dentry * direntry, char * data, size_t buf_size) | |||
348 | /* return alt name if available as pseudo attr */ | 352 | /* return alt name if available as pseudo attr */ |
349 | 353 | ||
350 | /* if proc/fs/cifs/streamstoxattr is set then | 354 | /* if proc/fs/cifs/streamstoxattr is set then |
351 | search server for EAs or streams to | 355 | search server for EAs or streams to |
352 | returns as xattrs */ | 356 | returns as xattrs */ |
353 | rc = CIFSSMBQAllEAs(xid,pTcon,full_path,data,buf_size, | 357 | rc = CIFSSMBQAllEAs(xid, pTcon, full_path, data, buf_size, |
354 | cifs_sb->local_nls, | 358 | cifs_sb->local_nls, |
355 | cifs_sb->mnt_cifs_flags & | 359 | cifs_sb->mnt_cifs_flags & |
356 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 360 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
357 | 361 | ||
358 | kfree(full_path); | 362 | kfree(full_path); |