Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
87dc800b
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
87dc800b
编写于
9月 16, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
new helper: kfree_put_link()
duplicated to hell and back... Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
12f38872
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
15 addition
and
38 deletion
+15
-38
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+1
-1
fs/cifs/cifsfs.h
fs/cifs/cifsfs.h
+0
-2
fs/cifs/link.c
fs/cifs/link.c
+0
-7
fs/ecryptfs/inode.c
fs/ecryptfs/inode.c
+1
-11
fs/gfs2/inode.c
fs/gfs2/inode.c
+1
-8
fs/libfs.c
fs/libfs.c
+10
-0
fs/proc/self.c
fs/proc/self.c
+1
-9
include/linux/fs.h
include/linux/fs.h
+1
-0
未找到文件。
fs/cifs/cifsfs.c
浏览文件 @
87dc800b
...
...
@@ -860,7 +860,7 @@ const struct inode_operations cifs_file_inode_ops = {
const
struct
inode_operations
cifs_symlink_inode_ops
=
{
.
readlink
=
generic_readlink
,
.
follow_link
=
cifs_follow_link
,
.
put_link
=
cifs
_put_link
,
.
put_link
=
kfree
_put_link
,
.
permission
=
cifs_permission
,
/* BB add the following two eventually */
/* revalidate: cifs_revalidate,
...
...
fs/cifs/cifsfs.h
浏览文件 @
87dc800b
...
...
@@ -115,8 +115,6 @@ extern struct vfsmount *cifs_dfs_d_automount(struct path *path);
/* Functions related to symlinks */
extern
void
*
cifs_follow_link
(
struct
dentry
*
direntry
,
struct
nameidata
*
nd
);
extern
void
cifs_put_link
(
struct
dentry
*
direntry
,
struct
nameidata
*
nd
,
void
*
);
extern
int
cifs_readlink
(
struct
dentry
*
direntry
,
char
__user
*
buffer
,
int
buflen
);
extern
int
cifs_symlink
(
struct
inode
*
inode
,
struct
dentry
*
direntry
,
...
...
fs/cifs/link.c
浏览文件 @
87dc800b
...
...
@@ -621,10 +621,3 @@ cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname)
free_xid
(
xid
);
return
rc
;
}
void
cifs_put_link
(
struct
dentry
*
direntry
,
struct
nameidata
*
nd
,
void
*
cookie
)
{
char
*
p
=
nd_get_link
(
nd
);
if
(
!
IS_ERR
(
p
))
kfree
(
p
);
}
fs/ecryptfs/inode.c
浏览文件 @
87dc800b
...
...
@@ -703,16 +703,6 @@ static void *ecryptfs_follow_link(struct dentry *dentry, struct nameidata *nd)
return
NULL
;
}
static
void
ecryptfs_put_link
(
struct
dentry
*
dentry
,
struct
nameidata
*
nd
,
void
*
ptr
)
{
char
*
buf
=
nd_get_link
(
nd
);
if
(
!
IS_ERR
(
buf
))
{
/* Free the char* */
kfree
(
buf
);
}
}
/**
* upper_size_to_lower_size
* @crypt_stat: Crypt_stat associated with file
...
...
@@ -1121,7 +1111,7 @@ static int ecryptfs_removexattr(struct dentry *dentry, const char *name)
const
struct
inode_operations
ecryptfs_symlink_iops
=
{
.
readlink
=
generic_readlink
,
.
follow_link
=
ecryptfs_follow_link
,
.
put_link
=
ecryptfs
_put_link
,
.
put_link
=
kfree
_put_link
,
.
permission
=
ecryptfs_permission
,
.
setattr
=
ecryptfs_setattr
,
.
getattr
=
ecryptfs_getattr_link
,
...
...
fs/gfs2/inode.c
浏览文件 @
87dc800b
...
...
@@ -1506,13 +1506,6 @@ static void *gfs2_follow_link(struct dentry *dentry, struct nameidata *nd)
return
NULL
;
}
static
void
gfs2_put_link
(
struct
dentry
*
dentry
,
struct
nameidata
*
nd
,
void
*
p
)
{
char
*
s
=
nd_get_link
(
nd
);
if
(
!
IS_ERR
(
s
))
kfree
(
s
);
}
/**
* gfs2_permission -
* @inode: The inode
...
...
@@ -1864,7 +1857,7 @@ const struct inode_operations gfs2_dir_iops = {
const
struct
inode_operations
gfs2_symlink_iops
=
{
.
readlink
=
generic_readlink
,
.
follow_link
=
gfs2_follow_link
,
.
put_link
=
gfs2
_put_link
,
.
put_link
=
kfree
_put_link
,
.
permission
=
gfs2_permission
,
.
setattr
=
gfs2_setattr
,
.
getattr
=
gfs2_getattr
,
...
...
fs/libfs.c
浏览文件 @
87dc800b
...
...
@@ -10,6 +10,7 @@
#include <linux/vfs.h>
#include <linux/quotaops.h>
#include <linux/mutex.h>
#include <linux/namei.h>
#include <linux/exportfs.h>
#include <linux/writeback.h>
#include <linux/buffer_head.h>
/* sync_mapping_buffers */
...
...
@@ -992,3 +993,12 @@ int noop_fsync(struct file *file, loff_t start, loff_t end, int datasync)
return
0
;
}
EXPORT_SYMBOL
(
noop_fsync
);
void
kfree_put_link
(
struct
dentry
*
dentry
,
struct
nameidata
*
nd
,
void
*
cookie
)
{
char
*
s
=
nd_get_link
(
nd
);
if
(
!
IS_ERR
(
s
))
kfree
(
s
);
}
EXPORT_SYMBOL
(
kfree_put_link
);
fs/proc/self.c
浏览文件 @
87dc800b
...
...
@@ -36,18 +36,10 @@ static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
return
NULL
;
}
static
void
proc_self_put_link
(
struct
dentry
*
dentry
,
struct
nameidata
*
nd
,
void
*
cookie
)
{
char
*
s
=
nd_get_link
(
nd
);
if
(
!
IS_ERR
(
s
))
kfree
(
s
);
}
static
const
struct
inode_operations
proc_self_inode_operations
=
{
.
readlink
=
proc_self_readlink
,
.
follow_link
=
proc_self_follow_link
,
.
put_link
=
proc_self
_put_link
,
.
put_link
=
kfree
_put_link
,
};
static
unsigned
self_inum
;
...
...
include/linux/fs.h
浏览文件 @
87dc800b
...
...
@@ -2502,6 +2502,7 @@ extern int __page_symlink(struct inode *inode, const char *symname, int len,
int
nofs
);
extern
int
page_symlink
(
struct
inode
*
inode
,
const
char
*
symname
,
int
len
);
extern
const
struct
inode_operations
page_symlink_inode_operations
;
extern
void
kfree_put_link
(
struct
dentry
*
,
struct
nameidata
*
,
void
*
);
extern
int
generic_readlink
(
struct
dentry
*
,
char
__user
*
,
int
);
extern
void
generic_fillattr
(
struct
inode
*
,
struct
kstat
*
);
extern
int
vfs_getattr
(
struct
path
*
,
struct
kstat
*
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录