Skip to content

Commit 0945f35

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: fs/9p: Don't set dentry->d_op in create routines fs/9p: fix spelling typo fs/9p: TREADLINK bugfix net/9p: Use proper data types fs/9p: Simplify the .L create operation fs/9p: Move dotl inode operations into a seperate file fs/9p: fix menu presentation fs/9p: Fix the return error on default acl removal fs/9p: Remove unnecessary semicolons
2 parents 7bc4a4c + b8b80cf commit 0945f35

8 files changed

Lines changed: 887 additions & 884 deletions

File tree

‎fs/9p/Kconfig‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ config 9P_FS
99

1010
If unsure, say N.
1111

12+
if 9P_FS
13+
1214
config 9P_FSCACHE
1315
bool "Enable 9P client caching support (EXPERIMENTAL)"
1416
depends on EXPERIMENTAL
@@ -20,7 +22,6 @@ config 9P_FSCACHE
2022

2123
config 9P_FS_POSIX_ACL
2224
bool "9P POSIX Access Control Lists"
23-
depends on 9P_FS
2425
select FS_POSIX_ACL
2526
help
2627
POSIX Access Control Lists (ACLs) support permissions for users and
@@ -30,3 +31,5 @@ config 9P_FS_POSIX_ACL
3031
Linux website <http://acl.bestbits.at/>.
3132

3233
If you don't know what Access Control Lists are, say N
34+
35+
endif

‎fs/9p/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ obj-$(CONFIG_9P_FS) := 9p.o
33
9p-objs := \
44
vfs_super.o \
55
vfs_inode.o \
6+
vfs_inode_dotl.o \
67
vfs_addr.o \
78
vfs_file.o \
89
vfs_dir.o \

‎fs/9p/acl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static struct posix_acl *__v9fs_get_acl(struct p9_fid *fid, char *name)
2828
{
2929
ssize_t size;
3030
void *value = NULL;
31-
struct posix_acl *acl = NULL;;
31+
struct posix_acl *acl = NULL;
3232

3333
size = v9fs_fid_xattr_get(fid, name, NULL, 0);
3434
if (size > 0) {
@@ -365,7 +365,7 @@ static int v9fs_xattr_set_acl(struct dentry *dentry, const char *name,
365365
case ACL_TYPE_DEFAULT:
366366
name = POSIX_ACL_XATTR_DEFAULT;
367367
if (!S_ISDIR(inode->i_mode)) {
368-
retval = -EINVAL;
368+
retval = acl ? -EINVAL : 0;
369369
goto err_out;
370370
}
371371
break;

‎fs/9p/v9fs.h‎

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,27 @@ struct v9fs_session_info {
113113

114114
struct p9_fid *v9fs_session_init(struct v9fs_session_info *, const char *,
115115
char *);
116-
void v9fs_session_close(struct v9fs_session_info *v9ses);
117-
void v9fs_session_cancel(struct v9fs_session_info *v9ses);
118-
void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses);
116+
extern void v9fs_session_close(struct v9fs_session_info *v9ses);
117+
extern void v9fs_session_cancel(struct v9fs_session_info *v9ses);
118+
extern void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses);
119+
extern struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
120+
struct nameidata *nameidata);
121+
extern int v9fs_vfs_unlink(struct inode *i, struct dentry *d);
122+
extern int v9fs_vfs_rmdir(struct inode *i, struct dentry *d);
123+
extern int v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
124+
struct inode *new_dir, struct dentry *new_dentry);
125+
extern void v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd,
126+
void *p);
127+
extern struct inode *v9fs_inode(struct v9fs_session_info *v9ses,
128+
struct p9_fid *fid,
129+
struct super_block *sb);
130+
131+
extern const struct inode_operations v9fs_dir_inode_operations_dotl;
132+
extern const struct inode_operations v9fs_file_inode_operations_dotl;
133+
extern const struct inode_operations v9fs_symlink_inode_operations_dotl;
134+
extern struct inode *v9fs_inode_dotl(struct v9fs_session_info *v9ses,
135+
struct p9_fid *fid,
136+
struct super_block *sb);
119137

120138
/* other default globals */
121139
#define V9FS_PORT 564
@@ -138,3 +156,21 @@ static inline int v9fs_proto_dotl(struct v9fs_session_info *v9ses)
138156
{
139157
return v9ses->flags & V9FS_PROTO_2000L;
140158
}
159+
160+
/**
161+
* v9fs_inode_from_fid - Helper routine to populate an inode by
162+
* issuing a attribute request
163+
* @v9ses: session information
164+
* @fid: fid to issue attribute request for
165+
* @sb: superblock on which to create inode
166+
*
167+
*/
168+
static inline struct inode *
169+
v9fs_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,
170+
struct super_block *sb)
171+
{
172+
if (v9fs_proto_dotl(v9ses))
173+
return v9fs_inode_dotl(v9ses, fid, sb);
174+
else
175+
return v9fs_inode(v9ses, fid, sb);
176+
}

0 commit comments

Comments
 (0)