v9fs.h (a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0) v9fs.h (724a08450f74b02bd89078a596fd24857827c012)
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * V9FS definitions.
4 *
5 * Copyright (C) 2004-2008 by Eric Van Hensbergen <ericvh@gmail.com>
6 * Copyright (C) 2002 by Ron Minnich <rminnich@lanl.gov>
7 */
8#ifndef FS_9P_V9FS_H

--- 165 unchanged lines hidden (view full) ---

174extern struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
175 unsigned int flags);
176extern int v9fs_vfs_unlink(struct inode *i, struct dentry *d);
177extern int v9fs_vfs_rmdir(struct inode *i, struct dentry *d);
178extern int v9fs_vfs_rename(struct mnt_idmap *idmap,
179 struct inode *old_dir, struct dentry *old_dentry,
180 struct inode *new_dir, struct dentry *new_dentry,
181 unsigned int flags);
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * V9FS definitions.
4 *
5 * Copyright (C) 2004-2008 by Eric Van Hensbergen <ericvh@gmail.com>
6 * Copyright (C) 2002 by Ron Minnich <rminnich@lanl.gov>
7 */
8#ifndef FS_9P_V9FS_H

--- 165 unchanged lines hidden (view full) ---

174extern struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
175 unsigned int flags);
176extern int v9fs_vfs_unlink(struct inode *i, struct dentry *d);
177extern int v9fs_vfs_rmdir(struct inode *i, struct dentry *d);
178extern int v9fs_vfs_rename(struct mnt_idmap *idmap,
179 struct inode *old_dir, struct dentry *old_dentry,
180 struct inode *new_dir, struct dentry *new_dentry,
181 unsigned int flags);
182extern struct inode *v9fs_inode_from_fid(struct v9fs_session_info *v9ses,
183 struct p9_fid *fid,
184 struct super_block *sb, int new);
182extern struct inode *v9fs_fid_iget(struct super_block *sb, struct p9_fid *fid);
185extern const struct inode_operations v9fs_dir_inode_operations_dotl;
186extern const struct inode_operations v9fs_file_inode_operations_dotl;
187extern const struct inode_operations v9fs_symlink_inode_operations_dotl;
188extern const struct netfs_request_ops v9fs_req_ops;
183extern const struct inode_operations v9fs_dir_inode_operations_dotl;
184extern const struct inode_operations v9fs_file_inode_operations_dotl;
185extern const struct inode_operations v9fs_symlink_inode_operations_dotl;
186extern const struct netfs_request_ops v9fs_req_ops;
189extern struct inode *v9fs_inode_from_fid_dotl(struct v9fs_session_info *v9ses,
190 struct p9_fid *fid,
191 struct super_block *sb, int new);
187extern struct inode *v9fs_fid_iget_dotl(struct super_block *sb,
188 struct p9_fid *fid);
192
193/* other default globals */
194#define V9FS_PORT 564
195#define V9FS_DEFUSER "nobody"
196#define V9FS_DEFANAME ""
197#define V9FS_DEFUID KUIDT_INIT(-2)
198#define V9FS_DEFGID KGIDT_INIT(-2)
199

--- 25 unchanged lines hidden (view full) ---

225 * @sb: superblock on which to create inode
226 *
227 */
228static inline struct inode *
229v9fs_get_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,
230 struct super_block *sb)
231{
232 if (v9fs_proto_dotl(v9ses))
189
190/* other default globals */
191#define V9FS_PORT 564
192#define V9FS_DEFUSER "nobody"
193#define V9FS_DEFANAME ""
194#define V9FS_DEFUID KUIDT_INIT(-2)
195#define V9FS_DEFGID KGIDT_INIT(-2)
196

--- 25 unchanged lines hidden (view full) ---

222 * @sb: superblock on which to create inode
223 *
224 */
225static inline struct inode *
226v9fs_get_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,
227 struct super_block *sb)
228{
229 if (v9fs_proto_dotl(v9ses))
233 return v9fs_inode_from_fid_dotl(v9ses, fid, sb, 0);
230 return v9fs_fid_iget_dotl(sb, fid);
234 else
231 else
235 return v9fs_inode_from_fid(v9ses, fid, sb, 0);
232 return v9fs_fid_iget(sb, fid);
236}
237
233}
234
238/**
239 * v9fs_get_new_inode_from_fid - Helper routine to populate an inode by
240 * issuing a attribute request
241 * @v9ses: session information
242 * @fid: fid to issue attribute request for
243 * @sb: superblock on which to create inode
244 *
245 */
246static inline struct inode *
247v9fs_get_new_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,
248 struct super_block *sb)
249{
250 if (v9fs_proto_dotl(v9ses))
251 return v9fs_inode_from_fid_dotl(v9ses, fid, sb, 1);
252 else
253 return v9fs_inode_from_fid(v9ses, fid, sb, 1);
254}
255
256#endif
235#endif