mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
[CIFS] reduce checkpatch warnings
Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
f315ccb3e6
commit
ad7a2926b9
23 changed files with 167 additions and 279 deletions
|
@ -461,7 +461,7 @@ A partial list of the supported mount options follows:
|
||||||
cifsacl Report mode bits (e.g. on stat) based on the Windows ACL for
|
cifsacl Report mode bits (e.g. on stat) based on the Windows ACL for
|
||||||
the file. (EXPERIMENTAL)
|
the file. (EXPERIMENTAL)
|
||||||
servern Specify the server 's netbios name (RFC1001 name) to use
|
servern Specify the server 's netbios name (RFC1001 name) to use
|
||||||
when attempting to setup a session to the server. This is
|
when attempting to setup a session to the server.
|
||||||
This is needed for mounting to some older servers (such
|
This is needed for mounting to some older servers (such
|
||||||
as OS/2 or Windows 98 and Windows ME) since they do not
|
as OS/2 or Windows 98 and Windows ME) since they do not
|
||||||
support a default server name. A server name can be up
|
support a default server name. A server name can be up
|
||||||
|
|
|
@ -98,8 +98,7 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
|
||||||
if (mid_entry->resp_buf) {
|
if (mid_entry->resp_buf) {
|
||||||
cifs_dump_detail(mid_entry->resp_buf);
|
cifs_dump_detail(mid_entry->resp_buf);
|
||||||
cifs_dump_mem("existing buf: ",
|
cifs_dump_mem("existing buf: ",
|
||||||
mid_entry->resp_buf,
|
mid_entry->resp_buf, 62);
|
||||||
62 /* fixme */);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,7 +254,8 @@ UniStrstr(const wchar_t *ucs1, const wchar_t *ucs2)
|
||||||
const wchar_t *anchor2 = ucs2;
|
const wchar_t *anchor2 = ucs2;
|
||||||
|
|
||||||
while (*ucs1) {
|
while (*ucs1) {
|
||||||
if (*ucs1 == *ucs2) { /* Partial match found */
|
if (*ucs1 == *ucs2) {
|
||||||
|
/* Partial match found */
|
||||||
ucs1++;
|
ucs1++;
|
||||||
ucs2++;
|
ucs2++;
|
||||||
} else {
|
} else {
|
||||||
|
@ -279,7 +280,8 @@ UniToupper(register wchar_t uc)
|
||||||
{
|
{
|
||||||
register const struct UniCaseRange *rp;
|
register const struct UniCaseRange *rp;
|
||||||
|
|
||||||
if (uc < sizeof (CifsUniUpperTable)) { /* Latin characters */
|
if (uc < sizeof(CifsUniUpperTable)) {
|
||||||
|
/* Latin characters */
|
||||||
return uc + CifsUniUpperTable[uc]; /* Use base tables */
|
return uc + CifsUniUpperTable[uc]; /* Use base tables */
|
||||||
} else {
|
} else {
|
||||||
rp = CifsUniUpperRange; /* Use range tables */
|
rp = CifsUniUpperRange; /* Use range tables */
|
||||||
|
@ -320,7 +322,8 @@ UniTolower(wchar_t uc)
|
||||||
{
|
{
|
||||||
register struct UniCaseRange *rp;
|
register struct UniCaseRange *rp;
|
||||||
|
|
||||||
if (uc < sizeof (UniLowerTable)) { /* Latin characters */
|
if (uc < sizeof(UniLowerTable)) {
|
||||||
|
/* Latin characters */
|
||||||
return uc + UniLowerTable[uc]; /* Use base tables */
|
return uc + UniLowerTable[uc]; /* Use base tables */
|
||||||
} else {
|
} else {
|
||||||
rp = UniLowerRange; /* Use range tables */
|
rp = UniLowerRange; /* Use range tables */
|
||||||
|
|
|
@ -46,8 +46,7 @@ static struct cifs_wksid wksidarr[NUM_WK_SIDS] = {
|
||||||
static const struct cifs_sid sid_everyone = {
|
static const struct cifs_sid sid_everyone = {
|
||||||
1, 1, {0, 0, 0, 0, 0, 1}, {0} };
|
1, 1, {0, 0, 0, 0, 0, 1}, {0} };
|
||||||
/* group users */
|
/* group users */
|
||||||
static const struct cifs_sid sid_user =
|
static const struct cifs_sid sid_user = {1, 2 , {0, 0, 0, 0, 0, 5}, {} };
|
||||||
{1, 2 , {0, 0, 0, 0, 0, 5}, {} };
|
|
||||||
|
|
||||||
|
|
||||||
int match_sid(struct cifs_sid *ctsid)
|
int match_sid(struct cifs_sid *ctsid)
|
||||||
|
@ -195,9 +194,9 @@ static void access_flags_to_mode(__le32 ace_flags, int type, umode_t *pmode,
|
||||||
/* For deny ACEs we change the mask so that subsequent allow access
|
/* For deny ACEs we change the mask so that subsequent allow access
|
||||||
control entries do not turn on the bits we are denying */
|
control entries do not turn on the bits we are denying */
|
||||||
if (type == ACCESS_DENIED) {
|
if (type == ACCESS_DENIED) {
|
||||||
if (flags & GENERIC_ALL) {
|
if (flags & GENERIC_ALL)
|
||||||
*pbits_to_set &= ~S_IRWXUGO;
|
*pbits_to_set &= ~S_IRWXUGO;
|
||||||
}
|
|
||||||
if ((flags & GENERIC_WRITE) ||
|
if ((flags & GENERIC_WRITE) ||
|
||||||
((flags & FILE_WRITE_RIGHTS) == FILE_WRITE_RIGHTS))
|
((flags & FILE_WRITE_RIGHTS) == FILE_WRITE_RIGHTS))
|
||||||
*pbits_to_set &= ~S_IWUGO;
|
*pbits_to_set &= ~S_IWUGO;
|
||||||
|
|
|
@ -203,9 +203,8 @@ cifs_put_super(struct super_block *sb)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rc = cifs_umount(sb, cifs_sb);
|
rc = cifs_umount(sb, cifs_sb);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cERROR(1, ("cifs_umount failed with return code %d", rc));
|
cERROR(1, ("cifs_umount failed with return code %d", rc));
|
||||||
}
|
|
||||||
#ifdef CONFIG_CIFS_DFS_UPCALL
|
#ifdef CONFIG_CIFS_DFS_UPCALL
|
||||||
if (cifs_sb->mountdata) {
|
if (cifs_sb->mountdata) {
|
||||||
kfree(cifs_sb->mountdata);
|
kfree(cifs_sb->mountdata);
|
||||||
|
|
|
@ -53,11 +53,11 @@ extern int SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses,
|
||||||
extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *,
|
extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *,
|
||||||
struct kvec *, int /* nvec to send */,
|
struct kvec *, int /* nvec to send */,
|
||||||
int * /* type of buf returned */ , const int flags);
|
int * /* type of buf returned */ , const int flags);
|
||||||
extern int SendReceiveBlockingLock(const unsigned int /* xid */ ,
|
extern int SendReceiveBlockingLock(const unsigned int xid,
|
||||||
struct cifsTconInfo *,
|
struct cifsTconInfo *ptcon,
|
||||||
struct smb_hdr * /* input */ ,
|
struct smb_hdr *in_buf ,
|
||||||
struct smb_hdr * /* out */ ,
|
struct smb_hdr *out_buf,
|
||||||
int * /* bytes returned */);
|
int *bytes_returned);
|
||||||
extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length);
|
extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length);
|
||||||
extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *);
|
extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *);
|
||||||
extern int is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof);
|
extern int is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof);
|
||||||
|
@ -84,7 +84,7 @@ extern __u16 GetNextMid(struct TCP_Server_Info *server);
|
||||||
extern struct oplock_q_entry *AllocOplockQEntry(struct inode *, u16,
|
extern struct oplock_q_entry *AllocOplockQEntry(struct inode *, u16,
|
||||||
struct cifsTconInfo *);
|
struct cifsTconInfo *);
|
||||||
extern void DeleteOplockQEntry(struct oplock_q_entry *);
|
extern void DeleteOplockQEntry(struct oplock_q_entry *);
|
||||||
extern struct timespec cifs_NTtimeToUnix(u64 /* utc nanoseconds since 1601 */ );
|
extern struct timespec cifs_NTtimeToUnix(u64 utc_nanoseconds_since_1601);
|
||||||
extern u64 cifs_UnixTimeToNT(struct timespec);
|
extern u64 cifs_UnixTimeToNT(struct timespec);
|
||||||
extern __le64 cnvrtDosCifsTm(__u16 date, __u16 time);
|
extern __le64 cnvrtDosCifsTm(__u16 date, __u16 time);
|
||||||
extern struct timespec cnvrtDosUnixTm(__u16 date, __u16 time);
|
extern struct timespec cnvrtDosUnixTm(__u16 date, __u16 time);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* fs/cifs/cifssmb.c
|
* fs/cifs/cifssmb.c
|
||||||
*
|
*
|
||||||
* Copyright (C) International Business Machines Corp., 2002,2007
|
* Copyright (C) International Business Machines Corp., 2002,2008
|
||||||
* Author(s): Steve French (sfrench@us.ibm.com)
|
* Author(s): Steve French (sfrench@us.ibm.com)
|
||||||
*
|
*
|
||||||
* Contains the routines for constructing the SMB PDUs themselves
|
* Contains the routines for constructing the SMB PDUs themselves
|
||||||
|
@ -102,10 +102,12 @@ static void mark_open_files_invalid(struct cifsTconInfo *pTcon)
|
||||||
to this tcon */
|
to this tcon */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the return code is zero, this function must fill in request_buf pointer */
|
/* Allocate and return pointer to an SMB request buffer, and set basic
|
||||||
|
SMB information in the SMB header. If the return code is zero, this
|
||||||
|
function must have filled in request_buf pointer */
|
||||||
static int
|
static int
|
||||||
small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
|
small_smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
|
||||||
void **request_buf /* returned */)
|
void **request_buf)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
|
@ -363,7 +365,7 @@ smb_init(int smb_command, int wct, struct cifsTconInfo *tcon,
|
||||||
*response_buf = *request_buf;
|
*response_buf = *request_buf;
|
||||||
|
|
||||||
header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,
|
header_assemble((struct smb_hdr *) *request_buf, smb_command, tcon,
|
||||||
wct /*wct */ );
|
wct);
|
||||||
|
|
||||||
if (tcon != NULL)
|
if (tcon != NULL)
|
||||||
cifs_stats_inc(&tcon->num_smbs_sent);
|
cifs_stats_inc(&tcon->num_smbs_sent);
|
||||||
|
@ -868,9 +870,8 @@ PsxDelete:
|
||||||
pSMB->ByteCount = cpu_to_le16(byte_count);
|
pSMB->ByteCount = cpu_to_le16(byte_count);
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Posix delete returned %d", rc));
|
cFYI(1, ("Posix delete returned %d", rc));
|
||||||
}
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
|
||||||
cifs_stats_inc(&tcon->num_deletes);
|
cifs_stats_inc(&tcon->num_deletes);
|
||||||
|
@ -916,9 +917,8 @@ DelFileRetry:
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
cifs_stats_inc(&tcon->num_deletes);
|
cifs_stats_inc(&tcon->num_deletes);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Error in RMFile = %d", rc));
|
cFYI(1, ("Error in RMFile = %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
if (rc == -EAGAIN)
|
if (rc == -EAGAIN)
|
||||||
|
@ -961,9 +961,8 @@ RmDirRetry:
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
cifs_stats_inc(&tcon->num_rmdirs);
|
cifs_stats_inc(&tcon->num_rmdirs);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Error in RMDir = %d", rc));
|
cFYI(1, ("Error in RMDir = %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
if (rc == -EAGAIN)
|
if (rc == -EAGAIN)
|
||||||
|
@ -1005,9 +1004,8 @@ MkDirRetry:
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
cifs_stats_inc(&tcon->num_mkdirs);
|
cifs_stats_inc(&tcon->num_mkdirs);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Error in Mkdir = %d", rc));
|
cFYI(1, ("Error in Mkdir = %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
if (rc == -EAGAIN)
|
if (rc == -EAGAIN)
|
||||||
|
@ -1221,8 +1219,8 @@ OldOpenRetry:
|
||||||
|
|
||||||
if (create_options & CREATE_OPTION_SPECIAL)
|
if (create_options & CREATE_OPTION_SPECIAL)
|
||||||
pSMB->FileAttributes = cpu_to_le16(ATTR_SYSTEM);
|
pSMB->FileAttributes = cpu_to_le16(ATTR_SYSTEM);
|
||||||
else
|
else /* BB FIXME BB */
|
||||||
pSMB->FileAttributes = cpu_to_le16(0/*ATTR_NORMAL*/); /* BB FIXME */
|
pSMB->FileAttributes = cpu_to_le16(0/*ATTR_NORMAL*/);
|
||||||
|
|
||||||
/* if ((omode & S_IWUGO) == 0)
|
/* if ((omode & S_IWUGO) == 0)
|
||||||
pSMB->FileAttributes |= cpu_to_le32(ATTR_READONLY);*/
|
pSMB->FileAttributes |= cpu_to_le32(ATTR_READONLY);*/
|
||||||
|
@ -1556,9 +1554,9 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon,
|
||||||
} /* else setting file size with write of zero bytes */
|
} /* else setting file size with write of zero bytes */
|
||||||
if (wct == 14)
|
if (wct == 14)
|
||||||
byte_count = bytes_sent + 1; /* pad */
|
byte_count = bytes_sent + 1; /* pad */
|
||||||
else /* wct == 12 */ {
|
else /* wct == 12 */
|
||||||
byte_count = bytes_sent + 5; /* bigger pad, smaller smb hdr */
|
byte_count = bytes_sent + 5; /* bigger pad, smaller smb hdr */
|
||||||
}
|
|
||||||
pSMB->DataLengthLow = cpu_to_le16(bytes_sent & 0xFFFF);
|
pSMB->DataLengthLow = cpu_to_le16(bytes_sent & 0xFFFF);
|
||||||
pSMB->DataLengthHigh = cpu_to_le16(bytes_sent >> 16);
|
pSMB->DataLengthHigh = cpu_to_le16(bytes_sent >> 16);
|
||||||
pSMB->hdr.smb_buf_length += byte_count;
|
pSMB->hdr.smb_buf_length += byte_count;
|
||||||
|
@ -1744,9 +1742,8 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
|
||||||
/* SMB buffer freed by function above */
|
/* SMB buffer freed by function above */
|
||||||
}
|
}
|
||||||
cifs_stats_inc(&tcon->num_locks);
|
cifs_stats_inc(&tcon->num_locks);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Send error in Lock = %d", rc));
|
cFYI(1, ("Send error in Lock = %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
/* Note: On -EAGAIN error only caller can retry on handle based calls
|
/* Note: On -EAGAIN error only caller can retry on handle based calls
|
||||||
since file handle passed in no longer valid */
|
since file handle passed in no longer valid */
|
||||||
|
@ -1791,7 +1788,7 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon,
|
||||||
|
|
||||||
count = sizeof(struct cifs_posix_lock);
|
count = sizeof(struct cifs_posix_lock);
|
||||||
pSMB->MaxParameterCount = cpu_to_le16(2);
|
pSMB->MaxParameterCount = cpu_to_le16(2);
|
||||||
pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB PDU from sess */
|
pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB from sess */
|
||||||
pSMB->SetupCount = 1;
|
pSMB->SetupCount = 1;
|
||||||
pSMB->Reserved3 = 0;
|
pSMB->Reserved3 = 0;
|
||||||
if (get_flag)
|
if (get_flag)
|
||||||
|
@ -1972,9 +1969,8 @@ renameRetry:
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
cifs_stats_inc(&tcon->num_renames);
|
cifs_stats_inc(&tcon->num_renames);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Send error in rename = %d", rc));
|
cFYI(1, ("Send error in rename = %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
|
||||||
|
@ -2016,7 +2012,7 @@ int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon,
|
||||||
data_offset = (char *) (&pSMB->hdr.Protocol) + offset;
|
data_offset = (char *) (&pSMB->hdr.Protocol) + offset;
|
||||||
rename_info = (struct set_file_rename *) data_offset;
|
rename_info = (struct set_file_rename *) data_offset;
|
||||||
pSMB->MaxParameterCount = cpu_to_le16(2);
|
pSMB->MaxParameterCount = cpu_to_le16(2);
|
||||||
pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB PDU from sess */
|
pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB from sess */
|
||||||
pSMB->SetupCount = 1;
|
pSMB->SetupCount = 1;
|
||||||
pSMB->Reserved3 = 0;
|
pSMB->Reserved3 = 0;
|
||||||
pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FILE_INFORMATION);
|
pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FILE_INFORMATION);
|
||||||
|
@ -2052,9 +2048,8 @@ int CIFSSMBRenameOpenFile(const int xid, struct cifsTconInfo *pTcon,
|
||||||
rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
cifs_stats_inc(&pTcon->num_t2renames);
|
cifs_stats_inc(&pTcon->num_t2renames);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Send error in Rename (by file handle) = %d", rc));
|
cFYI(1, ("Send error in Rename (by file handle) = %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
|
||||||
|
@ -2211,9 +2206,8 @@ createSymLinkRetry:
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
cifs_stats_inc(&tcon->num_symlinks);
|
cifs_stats_inc(&tcon->num_symlinks);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Send error in SetPathInfo create symlink = %d", rc));
|
cFYI(1, ("Send error in SetPathInfo create symlink = %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
if (pSMB)
|
if (pSMB)
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
@ -2299,9 +2293,8 @@ createHardLinkRetry:
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
cifs_stats_inc(&tcon->num_hardlinks);
|
cifs_stats_inc(&tcon->num_hardlinks);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Send error in SetPathInfo (hard link) = %d", rc));
|
cFYI(1, ("Send error in SetPathInfo (hard link) = %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
if (rc == -EAGAIN)
|
if (rc == -EAGAIN)
|
||||||
|
@ -2370,9 +2363,9 @@ winCreateHardLinkRetry:
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
cifs_stats_inc(&tcon->num_hardlinks);
|
cifs_stats_inc(&tcon->num_hardlinks);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Send error in hard link (NT rename) = %d", rc));
|
cFYI(1, ("Send error in hard link (NT rename) = %d", rc));
|
||||||
}
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
if (rc == -EAGAIN)
|
if (rc == -EAGAIN)
|
||||||
goto winCreateHardLinkRetry;
|
goto winCreateHardLinkRetry;
|
||||||
|
@ -2968,9 +2961,8 @@ setAclRetry:
|
||||||
pSMB->ByteCount = cpu_to_le16(byte_count);
|
pSMB->ByteCount = cpu_to_le16(byte_count);
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Set POSIX ACL returned %d", rc));
|
cFYI(1, ("Set POSIX ACL returned %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
setACLerrorExit:
|
setACLerrorExit:
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
@ -3263,9 +3255,11 @@ QInfRetry:
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
cFYI(1, ("Send error in QueryInfo = %d", rc));
|
cFYI(1, ("Send error in QueryInfo = %d", rc));
|
||||||
} else if (pFinfo) { /* decode response */
|
} else if (pFinfo) {
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
__u32 time = le32_to_cpu(pSMBr->last_write_time);
|
__u32 time = le32_to_cpu(pSMBr->last_write_time);
|
||||||
|
|
||||||
|
/* decode response */
|
||||||
/* BB FIXME - add time zone adjustment BB */
|
/* BB FIXME - add time zone adjustment BB */
|
||||||
memset(pFinfo, 0, sizeof(FILE_ALL_INFO));
|
memset(pFinfo, 0, sizeof(FILE_ALL_INFO));
|
||||||
ts.tv_nsec = 0;
|
ts.tv_nsec = 0;
|
||||||
|
@ -3371,10 +3365,12 @@ QPathInfoRetry:
|
||||||
else if (pFindData) {
|
else if (pFindData) {
|
||||||
int size;
|
int size;
|
||||||
__u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
|
__u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
|
||||||
if (legacy) /* we do not read the last field, EAsize,
|
|
||||||
fortunately since it varies by subdialect
|
/* On legacy responses we do not read the last field,
|
||||||
and on Set vs. Get, is two bytes or 4
|
EAsize, fortunately since it varies by subdialect and
|
||||||
|
also note it differs on Set vs. Get, ie two bytes or 4
|
||||||
bytes depending but we don't care here */
|
bytes depending but we don't care here */
|
||||||
|
if (legacy)
|
||||||
size = sizeof(FILE_INFO_STANDARD);
|
size = sizeof(FILE_INFO_STANDARD);
|
||||||
else
|
else
|
||||||
size = sizeof(FILE_ALL_INFO);
|
size = sizeof(FILE_ALL_INFO);
|
||||||
|
@ -3476,85 +3472,6 @@ UnixQPathInfoRetry:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 /* function unused at present */
|
|
||||||
int CIFSFindSingle(const int xid, struct cifsTconInfo *tcon,
|
|
||||||
const char *searchName, FILE_ALL_INFO * findData,
|
|
||||||
const struct nls_table *nls_codepage)
|
|
||||||
{
|
|
||||||
/* level 257 SMB_ */
|
|
||||||
TRANSACTION2_FFIRST_REQ *pSMB = NULL;
|
|
||||||
TRANSACTION2_FFIRST_RSP *pSMBr = NULL;
|
|
||||||
int rc = 0;
|
|
||||||
int bytes_returned;
|
|
||||||
int name_len;
|
|
||||||
__u16 params, byte_count;
|
|
||||||
|
|
||||||
cFYI(1, ("In FindUnique"));
|
|
||||||
findUniqueRetry:
|
|
||||||
rc = smb_init(SMB_COM_TRANSACTION2, 15, tcon, (void **) &pSMB,
|
|
||||||
(void **) &pSMBr);
|
|
||||||
if (rc)
|
|
||||||
return rc;
|
|
||||||
|
|
||||||
if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
|
|
||||||
name_len =
|
|
||||||
cifsConvertToUCS((__le16 *) pSMB->FileName, searchName,
|
|
||||||
PATH_MAX, nls_codepage);
|
|
||||||
name_len++; /* trailing null */
|
|
||||||
name_len *= 2;
|
|
||||||
} else { /* BB improve the check for buffer overruns BB */
|
|
||||||
name_len = strnlen(searchName, PATH_MAX);
|
|
||||||
name_len++; /* trailing null */
|
|
||||||
strncpy(pSMB->FileName, searchName, name_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
params = 12 + name_len /* includes null */ ;
|
|
||||||
pSMB->TotalDataCount = 0; /* no EAs */
|
|
||||||
pSMB->MaxParameterCount = cpu_to_le16(2);
|
|
||||||
pSMB->MaxDataCount = cpu_to_le16(4000); /* BB find exact max SMB PDU from sess structure BB */
|
|
||||||
pSMB->MaxSetupCount = 0;
|
|
||||||
pSMB->Reserved = 0;
|
|
||||||
pSMB->Flags = 0;
|
|
||||||
pSMB->Timeout = 0;
|
|
||||||
pSMB->Reserved2 = 0;
|
|
||||||
pSMB->ParameterOffset = cpu_to_le16(
|
|
||||||
offsetof(struct smb_com_transaction2_ffirst_req, InformationLevel)-4);
|
|
||||||
pSMB->DataCount = 0;
|
|
||||||
pSMB->DataOffset = 0;
|
|
||||||
pSMB->SetupCount = 1; /* one byte, no need to le convert */
|
|
||||||
pSMB->Reserved3 = 0;
|
|
||||||
pSMB->SubCommand = cpu_to_le16(TRANS2_FIND_FIRST);
|
|
||||||
byte_count = params + 1 /* pad */ ;
|
|
||||||
pSMB->TotalParameterCount = cpu_to_le16(params);
|
|
||||||
pSMB->ParameterCount = pSMB->TotalParameterCount;
|
|
||||||
pSMB->SearchAttributes =
|
|
||||||
cpu_to_le16(ATTR_READONLY | ATTR_HIDDEN | ATTR_SYSTEM |
|
|
||||||
ATTR_DIRECTORY);
|
|
||||||
pSMB->SearchCount = cpu_to_le16(16); /* BB increase */
|
|
||||||
pSMB->SearchFlags = cpu_to_le16(1);
|
|
||||||
pSMB->InformationLevel = cpu_to_le16(SMB_FIND_FILE_DIRECTORY_INFO);
|
|
||||||
pSMB->SearchStorageType = 0; /* BB what should we set this to? BB */
|
|
||||||
pSMB->hdr.smb_buf_length += byte_count;
|
|
||||||
pSMB->ByteCount = cpu_to_le16(byte_count);
|
|
||||||
|
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
|
||||||
|
|
||||||
if (rc) {
|
|
||||||
cFYI(1, ("Send error in FindFileDirInfo = %d", rc));
|
|
||||||
} else { /* decode response */
|
|
||||||
cifs_stats_inc(&tcon->num_ffirst);
|
|
||||||
/* BB fill in */
|
|
||||||
}
|
|
||||||
|
|
||||||
cifs_buf_release(pSMB);
|
|
||||||
if (rc == -EAGAIN)
|
|
||||||
goto findUniqueRetry;
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
#endif /* end unused (temporarily) function */
|
|
||||||
|
|
||||||
/* xid, tcon, searchName and codepage are input parms, rest are returned */
|
/* xid, tcon, searchName and codepage are input parms, rest are returned */
|
||||||
int
|
int
|
||||||
CIFSFindFirst(const int xid, struct cifsTconInfo *tcon,
|
CIFSFindFirst(const int xid, struct cifsTconInfo *tcon,
|
||||||
|
@ -3836,9 +3753,9 @@ CIFSFindClose(const int xid, struct cifsTconInfo *tcon,
|
||||||
pSMB->FileID = searchHandle;
|
pSMB->FileID = searchHandle;
|
||||||
pSMB->ByteCount = 0;
|
pSMB->ByteCount = 0;
|
||||||
rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0);
|
rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cERROR(1, ("Send error in FindClose = %d", rc));
|
cERROR(1, ("Send error in FindClose = %d", rc));
|
||||||
}
|
|
||||||
cifs_stats_inc(&tcon->num_fclose);
|
cifs_stats_inc(&tcon->num_fclose);
|
||||||
|
|
||||||
/* Since session is dead, search handle closed on server already */
|
/* Since session is dead, search handle closed on server already */
|
||||||
|
@ -4560,10 +4477,9 @@ SETFSUnixRetry:
|
||||||
cERROR(1, ("Send error in SETFSUnixInfo = %d", rc));
|
cERROR(1, ("Send error in SETFSUnixInfo = %d", rc));
|
||||||
} else { /* decode response */
|
} else { /* decode response */
|
||||||
rc = validate_t2((struct smb_t2_rsp *)pSMBr);
|
rc = validate_t2((struct smb_t2_rsp *)pSMBr);
|
||||||
if (rc) {
|
if (rc)
|
||||||
rc = -EIO; /* bad smb */
|
rc = -EIO; /* bad smb */
|
||||||
}
|
}
|
||||||
}
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
|
||||||
if (rc == -EAGAIN)
|
if (rc == -EAGAIN)
|
||||||
|
@ -4744,9 +4660,8 @@ SetEOFRetry:
|
||||||
pSMB->ByteCount = cpu_to_le16(byte_count);
|
pSMB->ByteCount = cpu_to_le16(byte_count);
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("SetPathInfo (file size) returned %d", rc));
|
cFYI(1, ("SetPathInfo (file size) returned %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
|
||||||
|
@ -4897,9 +4812,8 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon,
|
||||||
pSMB->ByteCount = cpu_to_le16(byte_count);
|
pSMB->ByteCount = cpu_to_le16(byte_count);
|
||||||
memcpy(data_offset, data, sizeof(FILE_BASIC_INFO));
|
memcpy(data_offset, data, sizeof(FILE_BASIC_INFO));
|
||||||
rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0);
|
rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Send error in Set Time (SetFileInfo) = %d", rc));
|
cFYI(1, ("Send error in Set Time (SetFileInfo) = %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
/* Note: On -EAGAIN error only caller can retry on handle based calls
|
/* Note: On -EAGAIN error only caller can retry on handle based calls
|
||||||
since file handle passed in no longer valid */
|
since file handle passed in no longer valid */
|
||||||
|
@ -4975,9 +4889,8 @@ SetTimesRetry:
|
||||||
pSMB->ByteCount = cpu_to_le16(byte_count);
|
pSMB->ByteCount = cpu_to_le16(byte_count);
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("SetPathInfo (times) returned %d", rc));
|
cFYI(1, ("SetPathInfo (times) returned %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
|
||||||
|
@ -5027,9 +4940,8 @@ SetAttrLgcyRetry:
|
||||||
pSMB->ByteCount = cpu_to_le16(name_len + 1);
|
pSMB->ByteCount = cpu_to_le16(name_len + 1);
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("Error in LegacySetAttr = %d", rc));
|
cFYI(1, ("Error in LegacySetAttr = %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
|
||||||
|
@ -5138,9 +5050,8 @@ setPermsRetry:
|
||||||
pSMB->ByteCount = cpu_to_le16(byte_count);
|
pSMB->ByteCount = cpu_to_le16(byte_count);
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("SetPathInfo (perms) returned %d", rc));
|
cFYI(1, ("SetPathInfo (perms) returned %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
if (pSMB)
|
if (pSMB)
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
@ -5615,9 +5526,8 @@ SetEARetry:
|
||||||
pSMB->ByteCount = cpu_to_le16(byte_count);
|
pSMB->ByteCount = cpu_to_le16(byte_count);
|
||||||
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
|
||||||
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
(struct smb_hdr *) pSMBr, &bytes_returned, 0);
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("SetPathInfo (EA) returned %d", rc));
|
cFYI(1, ("SetPathInfo (EA) returned %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
cifs_buf_release(pSMB);
|
cifs_buf_release(pSMB);
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* vfs operations that deal with dentries
|
* vfs operations that deal with dentries
|
||||||
*
|
*
|
||||||
* Copyright (C) International Business Machines Corp., 2002,2007
|
* Copyright (C) International Business Machines Corp., 2002,2008
|
||||||
* Author(s): Steve French (sfrench@us.ibm.com)
|
* Author(s): Steve French (sfrench@us.ibm.com)
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
|
@ -111,16 +111,6 @@ cifs_bp_rename_retry:
|
||||||
return full_path;
|
return full_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* char * build_wildcard_path_from_dentry(struct dentry *direntry)
|
|
||||||
{
|
|
||||||
if(full_path == NULL)
|
|
||||||
return full_path;
|
|
||||||
|
|
||||||
full_path[namelen] = '\\';
|
|
||||||
full_path[namelen+1] = '*';
|
|
||||||
full_path[namelen+2] = 0;
|
|
||||||
BB remove above eight lines BB */
|
|
||||||
|
|
||||||
/* Inode operations in similar order to how they appear in Linux file fs.h */
|
/* Inode operations in similar order to how they appear in Linux file fs.h */
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -171,10 +161,9 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
|
||||||
disposition = FILE_OVERWRITE_IF;
|
disposition = FILE_OVERWRITE_IF;
|
||||||
else if ((oflags & O_CREAT) == O_CREAT)
|
else if ((oflags & O_CREAT) == O_CREAT)
|
||||||
disposition = FILE_OPEN_IF;
|
disposition = FILE_OPEN_IF;
|
||||||
else {
|
else
|
||||||
cFYI(1, ("Create flag not set in create function"));
|
cFYI(1, ("Create flag not set in create function"));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* BB add processing to set equivalent of mode - e.g. via CreateX with
|
/* BB add processing to set equivalent of mode - e.g. via CreateX with
|
||||||
ACLs */
|
ACLs */
|
||||||
|
@ -534,9 +523,8 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
|
||||||
int isValid = 1;
|
int isValid = 1;
|
||||||
|
|
||||||
if (direntry->d_inode) {
|
if (direntry->d_inode) {
|
||||||
if (cifs_revalidate(direntry)) {
|
if (cifs_revalidate(direntry))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
cFYI(1, ("neg dentry 0x%p name = %s",
|
cFYI(1, ("neg dentry 0x%p name = %s",
|
||||||
direntry, direntry->d_name.name));
|
direntry, direntry->d_name.name));
|
||||||
|
|
|
@ -35,9 +35,8 @@ static __u32 convert_to_cifs_notify_flags(unsigned long fcntl_notify_flags)
|
||||||
|
|
||||||
/* No way on Linux VFS to ask to monitor xattr
|
/* No way on Linux VFS to ask to monitor xattr
|
||||||
changes (and no stream support either */
|
changes (and no stream support either */
|
||||||
if (fcntl_notify_flags & DN_ACCESS) {
|
if (fcntl_notify_flags & DN_ACCESS)
|
||||||
cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_LAST_ACCESS;
|
cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_LAST_ACCESS;
|
||||||
}
|
|
||||||
if (fcntl_notify_flags & DN_MODIFY) {
|
if (fcntl_notify_flags & DN_MODIFY) {
|
||||||
/* What does this mean on directories? */
|
/* What does this mean on directories? */
|
||||||
cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_LAST_WRITE |
|
cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_LAST_WRITE |
|
||||||
|
@ -47,9 +46,8 @@ static __u32 convert_to_cifs_notify_flags(unsigned long fcntl_notify_flags)
|
||||||
cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_CREATION |
|
cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_CREATION |
|
||||||
FILE_NOTIFY_CHANGE_LAST_WRITE;
|
FILE_NOTIFY_CHANGE_LAST_WRITE;
|
||||||
}
|
}
|
||||||
if (fcntl_notify_flags & DN_DELETE) {
|
if (fcntl_notify_flags & DN_DELETE)
|
||||||
cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_LAST_WRITE;
|
cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_LAST_WRITE;
|
||||||
}
|
|
||||||
if (fcntl_notify_flags & DN_RENAME) {
|
if (fcntl_notify_flags & DN_RENAME) {
|
||||||
/* BB review this - checking various server behaviors */
|
/* BB review this - checking various server behaviors */
|
||||||
cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_DIR_NAME |
|
cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_DIR_NAME |
|
||||||
|
|
|
@ -353,9 +353,9 @@ static int cifs_reopen_file(struct file *file, int can_flush)
|
||||||
int disposition = FILE_OPEN;
|
int disposition = FILE_OPEN;
|
||||||
__u16 netfid;
|
__u16 netfid;
|
||||||
|
|
||||||
if (file->private_data) {
|
if (file->private_data)
|
||||||
pCifsFile = (struct cifsFileInfo *)file->private_data;
|
pCifsFile = (struct cifsFileInfo *)file->private_data;
|
||||||
} else
|
else
|
||||||
return -EBADF;
|
return -EBADF;
|
||||||
|
|
||||||
xid = GetXid();
|
xid = GetXid();
|
||||||
|
@ -1423,9 +1423,8 @@ static int cifs_writepage(struct page *page, struct writeback_control *wbc)
|
||||||
xid = GetXid();
|
xid = GetXid();
|
||||||
/* BB add check for wbc flags */
|
/* BB add check for wbc flags */
|
||||||
page_cache_get(page);
|
page_cache_get(page);
|
||||||
if (!PageUptodate(page)) {
|
if (!PageUptodate(page))
|
||||||
cFYI(1, ("ppw - page not up to date"));
|
cFYI(1, ("ppw - page not up to date"));
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set the "writeback" flag, and clear "dirty" in the radix tree.
|
* Set the "writeback" flag, and clear "dirty" in the radix tree.
|
||||||
|
@ -1460,9 +1459,9 @@ static int cifs_commit_write(struct file *file, struct page *page,
|
||||||
cFYI(1, ("commit write for page %p up to position %lld for %d",
|
cFYI(1, ("commit write for page %p up to position %lld for %d",
|
||||||
page, position, to));
|
page, position, to));
|
||||||
spin_lock(&inode->i_lock);
|
spin_lock(&inode->i_lock);
|
||||||
if (position > inode->i_size) {
|
if (position > inode->i_size)
|
||||||
i_size_write(inode, position);
|
i_size_write(inode, position);
|
||||||
}
|
|
||||||
spin_unlock(&inode->i_lock);
|
spin_unlock(&inode->i_lock);
|
||||||
if (!PageUptodate(page)) {
|
if (!PageUptodate(page)) {
|
||||||
position = ((loff_t)page->index << PAGE_CACHE_SHIFT) + offset;
|
position = ((loff_t)page->index << PAGE_CACHE_SHIFT) + offset;
|
||||||
|
@ -1596,9 +1595,9 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data,
|
||||||
}
|
}
|
||||||
open_file = (struct cifsFileInfo *)file->private_data;
|
open_file = (struct cifsFileInfo *)file->private_data;
|
||||||
|
|
||||||
if ((file->f_flags & O_ACCMODE) == O_WRONLY) {
|
if ((file->f_flags & O_ACCMODE) == O_WRONLY)
|
||||||
cFYI(1, ("attempting read on write only file instance"));
|
cFYI(1, ("attempting read on write only file instance"));
|
||||||
}
|
|
||||||
for (total_read = 0, current_offset = read_data;
|
for (total_read = 0, current_offset = read_data;
|
||||||
read_size > total_read;
|
read_size > total_read;
|
||||||
total_read += bytes_read, current_offset += bytes_read) {
|
total_read += bytes_read, current_offset += bytes_read) {
|
||||||
|
@ -1625,9 +1624,8 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data,
|
||||||
smb_read_data +
|
smb_read_data +
|
||||||
4 /* RFC1001 length field */ +
|
4 /* RFC1001 length field */ +
|
||||||
le16_to_cpu(pSMBr->DataOffset),
|
le16_to_cpu(pSMBr->DataOffset),
|
||||||
bytes_read)) {
|
bytes_read))
|
||||||
rc = -EFAULT;
|
rc = -EFAULT;
|
||||||
}
|
|
||||||
|
|
||||||
if (buf_type == CIFS_SMALL_BUFFER)
|
if (buf_type == CIFS_SMALL_BUFFER)
|
||||||
cifs_small_buf_release(smb_read_data);
|
cifs_small_buf_release(smb_read_data);
|
||||||
|
|
|
@ -490,9 +490,9 @@ int cifs_get_inode_info(struct inode **pinode,
|
||||||
if (decode_sfu_inode(inode,
|
if (decode_sfu_inode(inode,
|
||||||
le64_to_cpu(pfindData->EndOfFile),
|
le64_to_cpu(pfindData->EndOfFile),
|
||||||
search_path,
|
search_path,
|
||||||
cifs_sb, xid)) {
|
cifs_sb, xid))
|
||||||
cFYI(1, ("Unrecognized sfu inode type"));
|
cFYI(1, ("Unrecognized sfu inode type"));
|
||||||
}
|
|
||||||
cFYI(1, ("sfu mode 0%o", inode->i_mode));
|
cFYI(1, ("sfu mode 0%o", inode->i_mode));
|
||||||
} else {
|
} else {
|
||||||
inode->i_mode |= S_IFREG;
|
inode->i_mode |= S_IFREG;
|
||||||
|
@ -1198,9 +1198,8 @@ int cifs_rename(struct inode *source_inode, struct dentry *source_direntry,
|
||||||
} /* if we can not get memory just leave rc as EEXIST */
|
} /* if we can not get memory just leave rc as EEXIST */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rc) {
|
if (rc)
|
||||||
cFYI(1, ("rename rc %d", rc));
|
cFYI(1, ("rename rc %d", rc));
|
||||||
}
|
|
||||||
|
|
||||||
if ((rc == -EIO) || (rc == -EEXIST)) {
|
if ((rc == -EIO) || (rc == -EEXIST)) {
|
||||||
int oplock = FALSE;
|
int oplock = FALSE;
|
||||||
|
|
|
@ -302,9 +302,8 @@ hmac_md5_init_limK_to_64(const unsigned char *key, int key_len,
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* if key is longer than 64 bytes truncate it */
|
/* if key is longer than 64 bytes truncate it */
|
||||||
if (key_len > 64) {
|
if (key_len > 64)
|
||||||
key_len = 64;
|
key_len = 64;
|
||||||
}
|
|
||||||
|
|
||||||
/* start out by storing key in pads */
|
/* start out by storing key in pads */
|
||||||
memset(ctx->k_ipad, 0, sizeof(ctx->k_ipad));
|
memset(ctx->k_ipad, 0, sizeof(ctx->k_ipad));
|
||||||
|
@ -359,9 +358,9 @@ hmac_md5(unsigned char key[16], unsigned char *data, int data_len,
|
||||||
{
|
{
|
||||||
struct HMACMD5Context ctx;
|
struct HMACMD5Context ctx;
|
||||||
hmac_md5_init_limK_to_64(key, 16, &ctx);
|
hmac_md5_init_limK_to_64(key, 16, &ctx);
|
||||||
if (data_len != 0) {
|
if (data_len != 0)
|
||||||
hmac_md5_update(data, data_len, &ctx);
|
hmac_md5_update(data, data_len, &ctx);
|
||||||
}
|
|
||||||
hmac_md5_final(digest, &ctx);
|
hmac_md5_final(digest, &ctx);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* fs/cifs/misc.c
|
* fs/cifs/misc.c
|
||||||
*
|
*
|
||||||
* Copyright (C) International Business Machines Corp., 2002,2007
|
* Copyright (C) International Business Machines Corp., 2002,2008
|
||||||
* Author(s): Steve French (sfrench@us.ibm.com)
|
* Author(s): Steve French (sfrench@us.ibm.com)
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
|
@ -320,9 +320,9 @@ header_assemble(struct smb_hdr *buffer, char smb_command /* command */ ,
|
||||||
if (treeCon->ses) {
|
if (treeCon->ses) {
|
||||||
if (treeCon->ses->capabilities & CAP_UNICODE)
|
if (treeCon->ses->capabilities & CAP_UNICODE)
|
||||||
buffer->Flags2 |= SMBFLG2_UNICODE;
|
buffer->Flags2 |= SMBFLG2_UNICODE;
|
||||||
if (treeCon->ses->capabilities & CAP_STATUS32) {
|
if (treeCon->ses->capabilities & CAP_STATUS32)
|
||||||
buffer->Flags2 |= SMBFLG2_ERR_STATUS;
|
buffer->Flags2 |= SMBFLG2_ERR_STATUS;
|
||||||
}
|
|
||||||
/* Uid is not converted */
|
/* Uid is not converted */
|
||||||
buffer->Uid = treeCon->ses->Suid;
|
buffer->Uid = treeCon->ses->Suid;
|
||||||
buffer->Mid = GetNextMid(treeCon->ses->server);
|
buffer->Mid = GetNextMid(treeCon->ses->server);
|
||||||
|
@ -610,7 +610,8 @@ dump_smb(struct smb_hdr *smb_buf, int smb_buf_length)
|
||||||
|
|
||||||
buffer = (unsigned char *) smb_buf;
|
buffer = (unsigned char *) smb_buf;
|
||||||
for (i = 0, j = 0; i < smb_buf_length; i++, j++) {
|
for (i = 0, j = 0; i < smb_buf_length; i++, j++) {
|
||||||
if (i % 8 == 0) { /* have reached the beginning of line */
|
if (i % 8 == 0) {
|
||||||
|
/* have reached the beginning of line */
|
||||||
printk(KERN_DEBUG "| ");
|
printk(KERN_DEBUG "| ");
|
||||||
j = 0;
|
j = 0;
|
||||||
}
|
}
|
||||||
|
@ -621,7 +622,8 @@ dump_smb(struct smb_hdr *smb_buf, int smb_buf_length)
|
||||||
else
|
else
|
||||||
debug_line[1 + (2 * j)] = '_';
|
debug_line[1 + (2 * j)] = '_';
|
||||||
|
|
||||||
if (i % 8 == 7) { /* reached end of line, time to print ascii */
|
if (i % 8 == 7) {
|
||||||
|
/* reached end of line, time to print ascii */
|
||||||
debug_line[16] = 0;
|
debug_line[16] = 0;
|
||||||
printk(" | %s\n", debug_line);
|
printk(" | %s\n", debug_line);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* fs/cifs/netmisc.c
|
* fs/cifs/netmisc.c
|
||||||
*
|
*
|
||||||
* Copyright (c) International Business Machines Corp., 2002
|
* Copyright (c) International Business Machines Corp., 2002,2008
|
||||||
* Author(s): Steve French (sfrench@us.ibm.com)
|
* Author(s): Steve French (sfrench@us.ibm.com)
|
||||||
*
|
*
|
||||||
* Error mapping routines from Samba libsmb/errormap.c
|
* Error mapping routines from Samba libsmb/errormap.c
|
||||||
|
@ -253,7 +253,8 @@ static const struct {
|
||||||
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_MIX}, {
|
ERRDOS, 87, NT_STATUS_INVALID_PARAMETER_MIX}, {
|
||||||
ERRHRD, ERRgeneral, NT_STATUS_INVALID_QUOTA_LOWER}, {
|
ERRHRD, ERRgeneral, NT_STATUS_INVALID_QUOTA_LOWER}, {
|
||||||
ERRHRD, ERRgeneral, NT_STATUS_DISK_CORRUPT_ERROR}, {
|
ERRHRD, ERRgeneral, NT_STATUS_DISK_CORRUPT_ERROR}, {
|
||||||
ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_INVALID}, { /* mapping changed since shell does lookup on * and expects file not found */
|
/* mapping changed since shell does lookup on * expects FileNotFound */
|
||||||
|
ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_INVALID}, {
|
||||||
ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_NOT_FOUND}, {
|
ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_NOT_FOUND}, {
|
||||||
ERRDOS, ERRalreadyexists, NT_STATUS_OBJECT_NAME_COLLISION}, {
|
ERRDOS, ERRalreadyexists, NT_STATUS_OBJECT_NAME_COLLISION}, {
|
||||||
ERRHRD, ERRgeneral, NT_STATUS_HANDLE_NOT_WAITABLE}, {
|
ERRHRD, ERRgeneral, NT_STATUS_HANDLE_NOT_WAITABLE}, {
|
||||||
|
@ -820,7 +821,8 @@ map_smb_to_linux_error(struct smb_hdr *smb, int logErr)
|
||||||
/* old style errors */
|
/* old style errors */
|
||||||
|
|
||||||
/* DOS class smb error codes - map DOS */
|
/* DOS class smb error codes - map DOS */
|
||||||
if (smberrclass == ERRDOS) { /* 1 byte field no need to byte reverse */
|
if (smberrclass == ERRDOS) {
|
||||||
|
/* 1 byte field no need to byte reverse */
|
||||||
for (i = 0;
|
for (i = 0;
|
||||||
i <
|
i <
|
||||||
sizeof(mapping_table_ERRDOS) /
|
sizeof(mapping_table_ERRDOS) /
|
||||||
|
@ -834,7 +836,8 @@ map_smb_to_linux_error(struct smb_hdr *smb, int logErr)
|
||||||
}
|
}
|
||||||
/* else try next error mapping one to see if match */
|
/* else try next error mapping one to see if match */
|
||||||
}
|
}
|
||||||
} else if (smberrclass == ERRSRV) { /* server class of error codes */
|
} else if (smberrclass == ERRSRV) {
|
||||||
|
/* server class of error codes */
|
||||||
for (i = 0;
|
for (i = 0;
|
||||||
i <
|
i <
|
||||||
sizeof(mapping_table_ERRSRV) /
|
sizeof(mapping_table_ERRSRV) /
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* Directory search handling
|
* Directory search handling
|
||||||
*
|
*
|
||||||
* Copyright (C) International Business Machines Corp., 2004, 2007
|
* Copyright (C) International Business Machines Corp., 2004, 2008
|
||||||
* Author(s): Steve French (sfrench@us.ibm.com)
|
* Author(s): Steve French (sfrench@us.ibm.com)
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
|
@ -42,17 +42,14 @@ static void dump_cifs_file_struct(struct file *file, char *label)
|
||||||
cFYI(1, ("empty cifs private file data"));
|
cFYI(1, ("empty cifs private file data"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cf->invalidHandle) {
|
if (cf->invalidHandle)
|
||||||
cFYI(1, ("invalid handle"));
|
cFYI(1, ("invalid handle"));
|
||||||
}
|
if (cf->srch_inf.endOfSearch)
|
||||||
if (cf->srch_inf.endOfSearch) {
|
|
||||||
cFYI(1, ("end of search"));
|
cFYI(1, ("end of search"));
|
||||||
}
|
if (cf->srch_inf.emptyDir)
|
||||||
if (cf->srch_inf.emptyDir) {
|
|
||||||
cFYI(1, ("empty dir"));
|
cFYI(1, ("empty dir"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif /* DEBUG2 */
|
#endif /* DEBUG2 */
|
||||||
|
|
||||||
/* Returns one if new inode created (which therefore needs to be hashed) */
|
/* Returns one if new inode created (which therefore needs to be hashed) */
|
||||||
|
@ -198,9 +195,8 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
|
||||||
if (attr & ATTR_DIRECTORY) {
|
if (attr & ATTR_DIRECTORY) {
|
||||||
*pobject_type = DT_DIR;
|
*pobject_type = DT_DIR;
|
||||||
/* override default perms since we do not lock dirs */
|
/* override default perms since we do not lock dirs */
|
||||||
if (atomic_read(&cifsInfo->inUse) == 0) {
|
if (atomic_read(&cifsInfo->inUse) == 0)
|
||||||
tmp_inode->i_mode = cifs_sb->mnt_dir_mode;
|
tmp_inode->i_mode = cifs_sb->mnt_dir_mode;
|
||||||
}
|
|
||||||
tmp_inode->i_mode |= S_IFDIR;
|
tmp_inode->i_mode |= S_IFDIR;
|
||||||
} else if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) &&
|
} else if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) &&
|
||||||
(attr & ATTR_SYSTEM)) {
|
(attr & ATTR_SYSTEM)) {
|
||||||
|
@ -231,9 +227,8 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
|
||||||
} /* could add code here - to validate if device or weird share type? */
|
} /* could add code here - to validate if device or weird share type? */
|
||||||
|
|
||||||
/* can not fill in nlink here as in qpathinfo version and Unx search */
|
/* can not fill in nlink here as in qpathinfo version and Unx search */
|
||||||
if (atomic_read(&cifsInfo->inUse) == 0) {
|
if (atomic_read(&cifsInfo->inUse) == 0)
|
||||||
atomic_set(&cifsInfo->inUse, 1);
|
atomic_set(&cifsInfo->inUse, 1);
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock(&tmp_inode->i_lock);
|
spin_lock(&tmp_inode->i_lock);
|
||||||
if (is_size_safe_to_change(cifsInfo, end_of_file)) {
|
if (is_size_safe_to_change(cifsInfo, end_of_file)) {
|
||||||
|
@ -461,9 +456,8 @@ static int initiate_cifs_search(const int xid, struct file *file)
|
||||||
|
|
||||||
full_path = build_path_from_dentry(file->f_path.dentry);
|
full_path = build_path_from_dentry(file->f_path.dentry);
|
||||||
|
|
||||||
if (full_path == NULL) {
|
if (full_path == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
cFYI(1, ("Full path: %s start at: %lld", full_path, file->f_pos));
|
cFYI(1, ("Full path: %s start at: %lld", full_path, file->f_pos));
|
||||||
|
|
||||||
|
@ -471,9 +465,9 @@ ffirst_retry:
|
||||||
/* test for Unix extensions */
|
/* test for Unix extensions */
|
||||||
/* but now check for them on the share/mount not on the SMB session */
|
/* but now check for them on the share/mount not on the SMB session */
|
||||||
/* if (pTcon->ses->capabilities & CAP_UNIX) { */
|
/* if (pTcon->ses->capabilities & CAP_UNIX) { */
|
||||||
if (pTcon->unix_ext) {
|
if (pTcon->unix_ext)
|
||||||
cifsFile->srch_inf.info_level = SMB_FIND_FILE_UNIX;
|
cifsFile->srch_inf.info_level = SMB_FIND_FILE_UNIX;
|
||||||
} else if ((pTcon->ses->capabilities &
|
else if ((pTcon->ses->capabilities &
|
||||||
(CAP_NT_SMBS | CAP_NT_FIND)) == 0) {
|
(CAP_NT_SMBS | CAP_NT_FIND)) == 0) {
|
||||||
cifsFile->srch_inf.info_level = SMB_FIND_FILE_INFO_STANDARD;
|
cifsFile->srch_inf.info_level = SMB_FIND_FILE_INFO_STANDARD;
|
||||||
} else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
|
} else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) {
|
||||||
|
|
|
@ -313,10 +313,9 @@ str_to_key(unsigned char *str, unsigned char *key)
|
||||||
key[5] = ((str[4] & 0x1F) << 2) | (str[5] >> 6);
|
key[5] = ((str[4] & 0x1F) << 2) | (str[5] >> 6);
|
||||||
key[6] = ((str[5] & 0x3F) << 1) | (str[6] >> 7);
|
key[6] = ((str[5] & 0x3F) << 1) | (str[6] >> 7);
|
||||||
key[7] = str[6] & 0x7F;
|
key[7] = str[6] & 0x7F;
|
||||||
for (i = 0; i < 8; i++) {
|
for (i = 0; i < 8; i++)
|
||||||
key[i] = (key[i] << 1);
|
key[i] = (key[i] << 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
smbhash(unsigned char *out, unsigned char *in, unsigned char *key, int forw)
|
smbhash(unsigned char *out, unsigned char *in, unsigned char *key, int forw)
|
||||||
|
@ -344,9 +343,8 @@ smbhash(unsigned char *out, unsigned char *in, unsigned char *key, int forw)
|
||||||
|
|
||||||
dohash(outb, inb, keyb, forw);
|
dohash(outb, inb, keyb, forw);
|
||||||
|
|
||||||
for (i = 0; i < 8; i++) {
|
for (i = 0; i < 8; i++)
|
||||||
out[i] = 0;
|
out[i] = 0;
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < 64; i++) {
|
for (i = 0; i < 64; i++) {
|
||||||
if (outb[i])
|
if (outb[i])
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* fs/cifs/transport.c
|
* fs/cifs/transport.c
|
||||||
*
|
*
|
||||||
* Copyright (C) International Business Machines Corp., 2002,2007
|
* Copyright (C) International Business Machines Corp., 2002,2008
|
||||||
* Author(s): Steve French (sfrench@us.ibm.com)
|
* Author(s): Steve French (sfrench@us.ibm.com)
|
||||||
* Jeremy Allison (jra@samba.org) 2006.
|
* Jeremy Allison (jra@samba.org) 2006.
|
||||||
*
|
*
|
||||||
|
@ -358,9 +358,9 @@ static int allocate_mid(struct cifsSesInfo *ses, struct smb_hdr *in_buf,
|
||||||
} else if (ses->status != CifsGood) {
|
} else if (ses->status != CifsGood) {
|
||||||
/* check if SMB session is bad because we are setting it up */
|
/* check if SMB session is bad because we are setting it up */
|
||||||
if ((in_buf->Command != SMB_COM_SESSION_SETUP_ANDX) &&
|
if ((in_buf->Command != SMB_COM_SESSION_SETUP_ANDX) &&
|
||||||
(in_buf->Command != SMB_COM_NEGOTIATE)) {
|
(in_buf->Command != SMB_COM_NEGOTIATE))
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
} /* else ok - we are setting up session */
|
/* else ok - we are setting up session */
|
||||||
}
|
}
|
||||||
*ppmidQ = AllocMidQEntry(in_buf, ses);
|
*ppmidQ = AllocMidQEntry(in_buf, ses);
|
||||||
if (*ppmidQ == NULL)
|
if (*ppmidQ == NULL)
|
||||||
|
|
|
@ -139,9 +139,9 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name,
|
||||||
} else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
|
} else if (strncmp(ea_name, CIFS_XATTR_USER_PREFIX, 5) == 0) {
|
||||||
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
|
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
|
||||||
goto set_ea_exit;
|
goto set_ea_exit;
|
||||||
if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0) {
|
if (strncmp(ea_name, CIFS_XATTR_DOS_ATTRIB, 14) == 0)
|
||||||
cFYI(1, ("attempt to set cifs inode metadata"));
|
cFYI(1, ("attempt to set cifs inode metadata"));
|
||||||
}
|
|
||||||
ea_name += 5; /* skip past user. prefix */
|
ea_name += 5; /* skip past user. prefix */
|
||||||
rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
|
rc = CIFSSMBSetEA(xid, pTcon, full_path, ea_name, ea_value,
|
||||||
(__u16)value_size, cifs_sb->local_nls,
|
(__u16)value_size, cifs_sb->local_nls,
|
||||||
|
@ -303,11 +303,10 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
|
||||||
} else if (strncmp(ea_name,
|
} else if (strncmp(ea_name,
|
||||||
CIFS_XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
|
CIFS_XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) == 0) {
|
||||||
cFYI(1, ("Security xattr namespace not supported yet"));
|
cFYI(1, ("Security xattr namespace not supported yet"));
|
||||||
} else {
|
} else
|
||||||
cFYI(1,
|
cFYI(1,
|
||||||
("illegal xattr request %s (only user namespace supported)",
|
("illegal xattr request %s (only user namespace supported)",
|
||||||
ea_name));
|
ea_name));
|
||||||
}
|
|
||||||
|
|
||||||
/* We could add an additional check for streams ie
|
/* We could add an additional check for streams ie
|
||||||
if proc/fs/cifs/streamstoxattr is set then
|
if proc/fs/cifs/streamstoxattr is set then
|
||||||
|
|
Loading…
Reference in a new issue