4 * Copyright (c) International Business Machines Corp., 2003
5 * Author(s): Steve French (sfrench@us.ibm.com)
7 * This library is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published
9 * by the Free Software Foundation; either version 2.1 of the License, or
10 * (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
15 * the GNU Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include "cifsproto.h"
27 #include "cifs_debug.h"
29 int cifs_removexattr(struct dentry * direntry, const char * name)
35 int cifs_setxattr(struct dentry * direntry, const char * name,
36 const void * value, size_t size, int flags)
42 ssize_t cifs_getxattr(struct dentry * direntry, const char * name,
43 void * value, size_t size)
45 ssize_t rc = -EOPNOTSUPP;
49 ssize_t cifs_listxattr(struct dentry * direntry, char * ea_data, size_t ea_size)
51 ssize_t rc = -EOPNOTSUPP;
52 #ifdef CONFIG_CIFS_XATTR
54 struct cifs_sb_info *cifs_sb;
55 struct cifsTconInfo *pTcon;
56 struct super_block * sb;
60 if(direntry->d_inode == NULL)
62 sb = direntry->d_inode->i_sb;
67 cifs_sb = CIFS_SB(sb);
68 pTcon = cifs_sb->tcon;
70 down(&sb->s_vfs_rename_sem);
71 full_path = build_path_from_dentry(direntry);
72 up(&sb->s_vfs_rename_sem);
73 if(full_path == NULL) {
77 /* return dosattributes as pseudo xattr */
78 /* return alt name if available as pseudo attr */
80 /* if proc/fs/cifs/streamstoxattr is set then
81 search server for EAs or streams to
83 rc = CIFSSMBQAllEAs(xid,pTcon,full_path,ea_data,ea_size,cifs_sb->local_nls);