提交 2e4c83c6 编写于 作者: Y Yu Kuai 提交者: Zheng Zengkai

eulerfs: add inode_operations for symlink inode

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I40JRR
CVE: NA

--------------------------------------

Implement get_link, setattr and listxattr interfaces for symlink
inode operations.
Signed-off-by: NMingkai Dong <dongmingkai1@huawei.com>
Signed-off-by: NYu Kuai <yukuai3@huawei.com>
Reviewed-by: NHou Tao <houtao1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 1e483185
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/fs.h>
#include <linux/namei.h>
#include "euler.h"
static const char *eufs_get_link(struct dentry *dentry, struct inode *inode,
struct delayed_call *call)
{
struct eufs_inode *pi = EUFS_FRESH_PI(EUFS_PI(inode));
return ((char *)o2p(inode->i_sb, eufs_iread_root(pi))) + sizeof(u64);
}
const struct inode_operations eufs_symlink_inode_operations = {
.get_link = eufs_get_link,
.setattr = eufs_notify_change,
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册