Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
7119e220
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 1 年 前同步成功
通知
152
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7119e220
编写于
10月 22, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cifs: get rid of ->f_path.dentry->d_sb uses, add a new helper
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
ddb52f4f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
11 deletion
+16
-11
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+1
-2
fs/cifs/cifsglob.h
fs/cifs/cifsglob.h
+6
-0
fs/cifs/file.c
fs/cifs/file.c
+6
-6
fs/cifs/readdir.c
fs/cifs/readdir.c
+3
-3
未找到文件。
fs/cifs/cifsfs.c
浏览文件 @
7119e220
...
...
@@ -209,8 +209,7 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
static
long
cifs_fallocate
(
struct
file
*
file
,
int
mode
,
loff_t
off
,
loff_t
len
)
{
struct
super_block
*
sb
=
file
->
f_path
.
dentry
->
d_sb
;
struct
cifs_sb_info
*
cifs_sb
=
CIFS_SB
(
sb
);
struct
cifs_sb_info
*
cifs_sb
=
CIFS_FILE_SB
(
file
);
struct
cifs_tcon
*
tcon
=
cifs_sb_master_tcon
(
cifs_sb
);
struct
TCP_Server_Info
*
server
=
tcon
->
ses
->
server
;
...
...
fs/cifs/cifsglob.h
浏览文件 @
7119e220
...
...
@@ -1168,6 +1168,12 @@ CIFS_SB(struct super_block *sb)
return
sb
->
s_fs_info
;
}
static
inline
struct
cifs_sb_info
*
CIFS_FILE_SB
(
struct
file
*
file
)
{
return
CIFS_SB
(
file_inode
(
file
)
->
i_sb
);
}
static
inline
char
CIFS_DIR_SEP
(
const
struct
cifs_sb_info
*
cifs_sb
)
{
if
(
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_POSIX_PATHS
)
...
...
fs/cifs/file.c
浏览文件 @
7119e220
...
...
@@ -1586,7 +1586,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *flock)
cifs_read_flock
(
flock
,
&
type
,
&
lock
,
&
unlock
,
&
wait_flag
,
tcon
->
ses
->
server
);
cifs_sb
=
CIFS_
SB
(
file
->
f_path
.
dentry
->
d_sb
);
cifs_sb
=
CIFS_
FILE_SB
(
file
);
netfid
=
cfile
->
fid
.
netfid
;
cinode
=
CIFS_I
(
file_inode
(
file
));
...
...
@@ -2305,7 +2305,7 @@ int cifs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
struct
cifs_tcon
*
tcon
;
struct
TCP_Server_Info
*
server
;
struct
cifsFileInfo
*
smbfile
=
file
->
private_data
;
struct
cifs_sb_info
*
cifs_sb
=
CIFS_
SB
(
file
->
f_path
.
dentry
->
d_sb
);
struct
cifs_sb_info
*
cifs_sb
=
CIFS_
FILE_SB
(
file
);
struct
inode
*
inode
=
file
->
f_mapping
->
host
;
rc
=
filemap_write_and_wait_range
(
inode
->
i_mapping
,
start
,
end
);
...
...
@@ -2585,7 +2585,7 @@ cifs_iovec_write(struct file *file, struct iov_iter *from, loff_t *poffset)
iov_iter_truncate
(
from
,
len
);
INIT_LIST_HEAD
(
&
wdata_list
);
cifs_sb
=
CIFS_
SB
(
file
->
f_path
.
dentry
->
d_sb
);
cifs_sb
=
CIFS_
FILE_SB
(
file
);
open_file
=
file
->
private_data
;
tcon
=
tlink_tcon
(
open_file
->
tlink
);
...
...
@@ -3010,7 +3010,7 @@ ssize_t cifs_user_readv(struct kiocb *iocb, struct iov_iter *to)
return
0
;
INIT_LIST_HEAD
(
&
rdata_list
);
cifs_sb
=
CIFS_
SB
(
file
->
f_path
.
dentry
->
d_sb
);
cifs_sb
=
CIFS_
FILE_SB
(
file
);
open_file
=
file
->
private_data
;
tcon
=
tlink_tcon
(
open_file
->
tlink
);
...
...
@@ -3155,7 +3155,7 @@ cifs_read(struct file *file, char *read_data, size_t read_size, loff_t *offset)
__u32
pid
;
xid
=
get_xid
();
cifs_sb
=
CIFS_
SB
(
file
->
f_path
.
dentry
->
d_sb
);
cifs_sb
=
CIFS_
FILE_SB
(
file
);
/* FIXME: set up handlers for larger reads and/or convert to async */
rsize
=
min_t
(
unsigned
int
,
cifs_sb
->
rsize
,
CIFSMaxBufSize
);
...
...
@@ -3462,7 +3462,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping,
int
rc
;
struct
list_head
tmplist
;
struct
cifsFileInfo
*
open_file
=
file
->
private_data
;
struct
cifs_sb_info
*
cifs_sb
=
CIFS_
SB
(
file
->
f_path
.
dentry
->
d_sb
);
struct
cifs_sb_info
*
cifs_sb
=
CIFS_
FILE_SB
(
file
);
struct
TCP_Server_Info
*
server
;
pid_t
pid
;
...
...
fs/cifs/readdir.c
浏览文件 @
7119e220
...
...
@@ -261,7 +261,7 @@ initiate_cifs_search(const unsigned int xid, struct file *file)
int
rc
=
0
;
char
*
full_path
=
NULL
;
struct
cifsFileInfo
*
cifsFile
;
struct
cifs_sb_info
*
cifs_sb
=
CIFS_
SB
(
file
->
f_path
.
dentry
->
d_sb
);
struct
cifs_sb_info
*
cifs_sb
=
CIFS_
FILE_SB
(
file
);
struct
tcon_link
*
tlink
=
NULL
;
struct
cifs_tcon
*
tcon
;
struct
TCP_Server_Info
*
server
;
...
...
@@ -561,7 +561,7 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
loff_t
first_entry_in_buffer
;
loff_t
index_to_find
=
pos
;
struct
cifsFileInfo
*
cfile
=
file
->
private_data
;
struct
cifs_sb_info
*
cifs_sb
=
CIFS_
SB
(
file
->
f_path
.
dentry
->
d_sb
);
struct
cifs_sb_info
*
cifs_sb
=
CIFS_
FILE_SB
(
file
);
struct
TCP_Server_Info
*
server
=
tcon
->
ses
->
server
;
/* check if index in the buffer */
...
...
@@ -679,7 +679,7 @@ static int cifs_filldir(char *find_entry, struct file *file,
char
*
scratch_buf
,
unsigned
int
max_len
)
{
struct
cifsFileInfo
*
file_info
=
file
->
private_data
;
struct
super_block
*
sb
=
file
->
f_path
.
dentry
->
d
_sb
;
struct
super_block
*
sb
=
file
_inode
(
file
)
->
i
_sb
;
struct
cifs_sb_info
*
cifs_sb
=
CIFS_SB
(
sb
);
struct
cifs_dirent
de
=
{
NULL
,
};
struct
cifs_fattr
fattr
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录