Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f19159dc
Commit
f19159dc
authored
Apr 21, 2010
by
Steve French
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CIFS] Cleanup various minor breakage in previous cFYI cleanup
Signed-off-by:
Steve French
<
sfrench@us.ibm.com
>
parent
b6b38f70
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
29 deletions
+29
-29
fs/cifs/cifsfs.h
fs/cifs/cifsfs.h
+1
-1
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+11
-11
fs/cifs/file.c
fs/cifs/file.c
+6
-6
fs/cifs/inode.c
fs/cifs/inode.c
+11
-11
No files found.
fs/cifs/cifsfs.h
View file @
f19159dc
...
...
@@ -114,5 +114,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
extern
const
struct
export_operations
cifs_export_ops
;
#endif
/* EXPERIMENTAL */
#define CIFS_VERSION "1.6
2
"
#define CIFS_VERSION "1.6
3
"
#endif
/* _CIFSFS_H */
fs/cifs/cifssmb.c
View file @
f19159dc
/*
* fs/cifs/cifssmb.c
*
* Copyright (C) International Business Machines Corp., 2002,20
09
* Copyright (C) International Business Machines Corp., 2002,20
10
* Author(s): Steve French (sfrench@us.ibm.com)
*
* Contains the routines for constructing the SMB PDUs themselves
...
...
@@ -493,14 +493,14 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses)
goto
neg_err_exit
;
}
cFYI
(
1
,
(
"LANMAN negotiated"
)
);
cFYI
(
1
,
"LANMAN negotiated"
);
/* we will not end up setting signing flags - as no signing
was in LANMAN and server did not return the flags on */
goto
signing_check
;
#else
/* weak security disabled */
}
else
if
(
pSMBr
->
hdr
.
WordCount
==
13
)
{
cERROR
(
1
,
(
"mount failed, cifs module not built "
"with CIFS_WEAK_PW_HASH support"
)
)
;
cERROR
(
1
,
"mount failed, cifs module not built "
"with CIFS_WEAK_PW_HASH support"
);
rc
=
-
EOPNOTSUPP
;
#endif
/* WEAK_PW_HASH */
goto
neg_err_exit
;
...
...
@@ -1513,7 +1513,7 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon,
(
struct
smb_hdr
*
)
pSMBr
,
&
bytes_returned
,
long_op
);
cifs_stats_inc
(
&
tcon
->
num_writes
);
if
(
rc
)
{
cFYI
(
1
,
(
"Send error in write = %d"
,
rc
)
);
cFYI
(
1
,
"Send error in write = %d"
,
rc
);
}
else
{
*
nbytes
=
le16_to_cpu
(
pSMBr
->
CountHigh
);
*
nbytes
=
(
*
nbytes
)
<<
16
;
...
...
@@ -2529,7 +2529,7 @@ validate_ntransact(char *buf, char **ppparm, char **ppdata,
cFYI
(
1
,
"data starts after end of smb"
);
return
-
EINVAL
;
}
else
if
(
data_count
+
*
ppdata
>
end_of_smb
)
{
cFYI
(
1
,
"data %p + count %d (%p)
ends after end of smb
%p start %p"
,
cFYI
(
1
,
"data %p + count %d (%p)
past smb end
%p start %p"
,
*
ppdata
,
data_count
,
(
data_count
+
*
ppdata
),
end_of_smb
,
pSMBr
);
return
-
EINVAL
;
...
...
@@ -3304,7 +3304,7 @@ CIFSSMBQFileInfo(const int xid, struct cifsTconInfo *tcon,
rc
=
SendReceive
(
xid
,
tcon
->
ses
,
(
struct
smb_hdr
*
)
pSMB
,
(
struct
smb_hdr
*
)
pSMBr
,
&
bytes_returned
,
0
);
if
(
rc
)
{
cFYI
(
1
,
(
"Send error in QPathInfo = %d"
,
rc
)
);
cFYI
(
1
,
"Send error in QPathInfo = %d"
,
rc
);
}
else
{
/* decode response */
rc
=
validate_t2
((
struct
smb_t2_rsp
*
)
pSMBr
);
...
...
@@ -3472,14 +3472,14 @@ CIFSSMBUnixQFileInfo(const int xid, struct cifsTconInfo *tcon,
rc
=
SendReceive
(
xid
,
tcon
->
ses
,
(
struct
smb_hdr
*
)
pSMB
,
(
struct
smb_hdr
*
)
pSMBr
,
&
bytes_returned
,
0
);
if
(
rc
)
{
cFYI
(
1
,
(
"Send error in QPathInfo = %d"
,
rc
)
);
cFYI
(
1
,
"Send error in QPathInfo = %d"
,
rc
);
}
else
{
/* decode response */
rc
=
validate_t2
((
struct
smb_t2_rsp
*
)
pSMBr
);
if
(
rc
||
(
pSMBr
->
ByteCount
<
sizeof
(
FILE_UNIX_BASIC_INFO
)))
{
cERROR
(
1
,
(
"Malformed FILE_UNIX_BASIC_INFO response.
\n
"
cERROR
(
1
,
"Malformed FILE_UNIX_BASIC_INFO response.
\n
"
"Unix Extensions can be disabled on mount "
"by specifying the nosfu mount option."
)
)
;
"by specifying the nosfu mount option."
);
rc
=
-
EIO
;
/* bad smb */
}
else
{
__u16
data_offset
=
le16_to_cpu
(
pSMBr
->
t2
.
DataOffset
);
...
...
@@ -4037,7 +4037,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
data_end
=
(
char
*
)(
&
(
pSMBr
->
PathConsumed
))
+
le16_to_cpu
(
pSMBr
->
t2
.
DataCount
);
cFYI
(
1
,
"num_referrals: %d dfs flags: 0x%x ...
\n
"
,
cFYI
(
1
,
"num_referrals: %d dfs flags: 0x%x ...
\n
"
,
*
num_of_nodes
,
le32_to_cpu
(
pSMBr
->
DFSFlags
));
...
...
fs/cifs/file.c
View file @
f19159dc
...
...
@@ -3,7 +3,7 @@
*
* vfs operations that deal with files
*
* Copyright (C) International Business Machines Corp., 2002,20
07
* Copyright (C) International Business Machines Corp., 2002,20
10
* Author(s): Steve French (sfrench@us.ibm.com)
* Jeremy Allison (jra@samba.org)
*
...
...
@@ -855,9 +855,9 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock)
0
/* wait flag */
);
pfLock
->
fl_type
=
F_RDLCK
;
if
(
rc
!=
0
)
cERROR
(
1
,
(
"Error unlocking "
cERROR
(
1
,
"Error unlocking "
"previously locked range %d "
"during test of lock"
,
rc
)
)
;
"during test of lock"
,
rc
);
rc
=
0
;
}
else
{
pfLock
->
fl_type
=
F_WRLCK
;
...
...
@@ -1709,7 +1709,7 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync)
unsigned int rpages = 0;
int rc = 0;
cFYI(1, "sync page %p",page);
cFYI(1, "sync page %p",
page);
mapping = page->mapping;
if (!mapping)
return 0;
...
...
@@ -1998,7 +1998,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
cifs_sb
=
CIFS_SB
(
file
->
f_path
.
dentry
->
d_sb
);
pTcon
=
cifs_sb
->
tcon
;
cFYI
(
DBG2
,
(
"rpages: num pages %d"
,
num_pages
)
);
cFYI
(
DBG2
,
"rpages: num pages %d"
,
num_pages
);
for
(
i
=
0
;
i
<
num_pages
;
)
{
unsigned
contig_pages
;
struct
page
*
tmp_page
;
...
...
@@ -2083,7 +2083,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
}
}
else
{
cFYI
(
1
,
"No bytes read (%d) at offset %lld . "
"Cleaning remaining pages from readahead list"
,
"Cleaning remaining pages from readahead list"
,
bytes_read
,
offset
);
/* BB turn off caching and do new lookup on
file size at server? */
...
...
fs/cifs/inode.c
View file @
f19159dc
/*
* fs/cifs/inode.c
*
* Copyright (C) International Business Machines Corp., 2002,20
08
* Copyright (C) International Business Machines Corp., 2002,20
10
* Author(s): Steve French (sfrench@us.ibm.com)
*
* This library is free software; you can redistribute it and/or modify
...
...
@@ -86,30 +86,30 @@ cifs_revalidate_cache(struct inode *inode, struct cifs_fattr *fattr)
{
struct
cifsInodeInfo
*
cifs_i
=
CIFS_I
(
inode
);
cFYI
(
1
,
(
"%s: revalidating inode %llu"
,
__func__
,
cifs_i
->
uniqueid
)
);
cFYI
(
1
,
"%s: revalidating inode %llu"
,
__func__
,
cifs_i
->
uniqueid
);
if
(
inode
->
i_state
&
I_NEW
)
{
cFYI
(
1
,
(
"%s: inode %llu is new"
,
__func__
,
cifs_i
->
uniqueid
)
);
cFYI
(
1
,
"%s: inode %llu is new"
,
__func__
,
cifs_i
->
uniqueid
);
return
;
}
/* don't bother with revalidation if we have an oplock */
if
(
cifs_i
->
clientCanCacheRead
)
{
cFYI
(
1
,
(
"%s: inode %llu is oplocked"
,
__func__
,
cifs_i
->
uniqueid
)
)
;
cFYI
(
1
,
"%s: inode %llu is oplocked"
,
__func__
,
cifs_i
->
uniqueid
);
return
;
}
/* revalidate if mtime or size have changed */
if
(
timespec_equal
(
&
inode
->
i_mtime
,
&
fattr
->
cf_mtime
)
&&
cifs_i
->
server_eof
==
fattr
->
cf_eof
)
{
cFYI
(
1
,
(
"%s: inode %llu is unchanged"
,
__func__
,
cifs_i
->
uniqueid
)
)
;
cFYI
(
1
,
"%s: inode %llu is unchanged"
,
__func__
,
cifs_i
->
uniqueid
);
return
;
}
cFYI
(
1
,
(
"%s: invalidating inode %llu mapping"
,
__func__
,
cifs_i
->
uniqueid
)
)
;
cFYI
(
1
,
"%s: invalidating inode %llu mapping"
,
__func__
,
cifs_i
->
uniqueid
);
cifs_i
->
invalid_mapping
=
true
;
}
...
...
@@ -1577,9 +1577,9 @@ int cifs_revalidate_dentry(struct dentry *dentry)
goto
check_inval
;
}
cFYI
(
1
,
(
"Revalidate: %s inode 0x%p count %d dentry: 0x%p d_time %ld "
cFYI
(
1
,
"Revalidate: %s inode 0x%p count %d dentry: 0x%p d_time %ld "
"jiffies %ld"
,
full_path
,
inode
,
inode
->
i_count
.
counter
,
dentry
,
dentry
->
d_time
,
jiffies
)
)
;
dentry
,
dentry
->
d_time
,
jiffies
);
if
(
CIFS_SB
(
sb
)
->
tcon
->
unix_ext
)
rc
=
cifs_get_inode_info_unix
(
&
inode
,
full_path
,
sb
,
xid
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment