Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158363
b: refs/heads/master
c: 9aa55fb
h: refs/heads/master
i:
  158361: 4057996
  158359: 56a37c3
v: v3
  • Loading branch information
Ingo Molnar committed Sep 4, 2009
1 parent dccfd47 commit 80438ca
Show file tree
Hide file tree
Showing 30 changed files with 1,040 additions and 626 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa84e9eecfff478df2d00e94deb3fc40fe4634ad
refs/heads/master: 9aa55fbd01779a0b476d87cd9b5170fd5bebab1d
3 changes: 3 additions & 0 deletions trunk/Documentation/filesystems/9p.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ available from the same CVS repository.
There are user and developer mailing lists available through the v9fs project
on sourceforge (http://sourceforge.net/projects/v9fs).

A stand-alone version of the module (which should build for any 2.6 kernel)
is available via (http://github.com/ericvh/9p-sac/tree/master)

News and other information is maintained on SWiK (http://swik.net/v9fs).

Bug reports may be issued through the kernel.org bugzilla
Expand Down
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 31
EXTRAVERSION = -rc7
EXTRAVERSION = -rc8
NAME = Man-Eating Seals of Antiquity

# *DOCUMENTATION*
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/video/xen-fbfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,

xenfb_init_shared_page(info, fb_info);

ret = xenfb_connect_backend(dev, info);
if (ret < 0)
goto error;

ret = register_framebuffer(fb_info);
if (ret) {
fb_deferred_io_cleanup(fb_info);
Expand All @@ -464,10 +468,6 @@ static int __devinit xenfb_probe(struct xenbus_device *dev,
}
info->fb_info = fb_info;

ret = xenfb_connect_backend(dev, info);
if (ret < 0)
goto error;

xenfb_make_preferred_console();
return 0;

Expand Down
21 changes: 5 additions & 16 deletions trunk/fs/9p/v9fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static const match_table_t tokens = {
* Return 0 upon success, -ERRNO upon failure.
*/

static int v9fs_parse_options(struct v9fs_session_info *v9ses)
static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
{
char *options;
substring_t args[MAX_OPT_ARGS];
Expand All @@ -90,10 +90,10 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses)
v9ses->debug = 0;
v9ses->cache = 0;

if (!v9ses->options)
if (!opts)
return 0;

options = kstrdup(v9ses->options, GFP_KERNEL);
options = kstrdup(opts, GFP_KERNEL);
if (!options) {
P9_DPRINTK(P9_DEBUG_ERROR,
"failed to allocate copy of option string\n");
Expand Down Expand Up @@ -206,24 +206,14 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses,
v9ses->uid = ~0;
v9ses->dfltuid = V9FS_DEFUID;
v9ses->dfltgid = V9FS_DEFGID;
if (data) {
v9ses->options = kstrdup(data, GFP_KERNEL);
if (!v9ses->options) {
P9_DPRINTK(P9_DEBUG_ERROR,
"failed to allocate copy of option string\n");
retval = -ENOMEM;
goto error;
}
}

rc = v9fs_parse_options(v9ses);
rc = v9fs_parse_options(v9ses, data);
if (rc < 0) {
retval = rc;
goto error;
}

v9ses->clnt = p9_client_create(dev_name, v9ses->options);

v9ses->clnt = p9_client_create(dev_name, data);
if (IS_ERR(v9ses->clnt)) {
retval = PTR_ERR(v9ses->clnt);
v9ses->clnt = NULL;
Expand Down Expand Up @@ -280,7 +270,6 @@ void v9fs_session_close(struct v9fs_session_info *v9ses)

__putname(v9ses->uname);
__putname(v9ses->aname);
kfree(v9ses->options);
}

/**
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/9p/v9fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ struct v9fs_session_info {
unsigned int afid;
unsigned int cache;

char *options; /* copy of mount options */
char *uname; /* user name to mount as */
char *aname; /* name of remote hierarchy being mounted */
unsigned int maxdata; /* max data for client interface */
Expand Down
126 changes: 65 additions & 61 deletions trunk/fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ int v9fs_uflags2omode(int uflags, int extended)

/**
* v9fs_blank_wstat - helper function to setup a 9P stat structure
* @v9ses: 9P session info (for determining extended mode)
* @wstat: structure to initialize
*
*/
Expand Down Expand Up @@ -207,65 +206,72 @@ v9fs_blank_wstat(struct p9_wstat *wstat)

struct inode *v9fs_get_inode(struct super_block *sb, int mode)
{
int err;
struct inode *inode;
struct v9fs_session_info *v9ses = sb->s_fs_info;

P9_DPRINTK(P9_DEBUG_VFS, "super block: %p mode: %o\n", sb, mode);

inode = new_inode(sb);
if (inode) {
inode->i_mode = mode;
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
inode->i_blocks = 0;
inode->i_rdev = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
inode->i_mapping->a_ops = &v9fs_addr_operations;

switch (mode & S_IFMT) {
case S_IFIFO:
case S_IFBLK:
case S_IFCHR:
case S_IFSOCK:
if (!v9fs_extended(v9ses)) {
P9_DPRINTK(P9_DEBUG_ERROR,
"special files without extended mode\n");
return ERR_PTR(-EINVAL);
}
init_special_inode(inode, inode->i_mode,
inode->i_rdev);
break;
case S_IFREG:
inode->i_op = &v9fs_file_inode_operations;
inode->i_fop = &v9fs_file_operations;
break;
case S_IFLNK:
if (!v9fs_extended(v9ses)) {
P9_DPRINTK(P9_DEBUG_ERROR,
"extended modes used w/o 9P2000.u\n");
return ERR_PTR(-EINVAL);
}
inode->i_op = &v9fs_symlink_inode_operations;
break;
case S_IFDIR:
inc_nlink(inode);
if (v9fs_extended(v9ses))
inode->i_op = &v9fs_dir_inode_operations_ext;
else
inode->i_op = &v9fs_dir_inode_operations;
inode->i_fop = &v9fs_dir_operations;
break;
default:
P9_DPRINTK(P9_DEBUG_ERROR,
"BAD mode 0x%x S_IFMT 0x%x\n",
mode, mode & S_IFMT);
return ERR_PTR(-EINVAL);
}
} else {
if (!inode) {
P9_EPRINTK(KERN_WARNING, "Problem allocating inode\n");
return ERR_PTR(-ENOMEM);
}

inode->i_mode = mode;
inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid();
inode->i_blocks = 0;
inode->i_rdev = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
inode->i_mapping->a_ops = &v9fs_addr_operations;

switch (mode & S_IFMT) {
case S_IFIFO:
case S_IFBLK:
case S_IFCHR:
case S_IFSOCK:
if (!v9fs_extended(v9ses)) {
P9_DPRINTK(P9_DEBUG_ERROR,
"special files without extended mode\n");
err = -EINVAL;
goto error;
}
init_special_inode(inode, inode->i_mode, inode->i_rdev);
break;
case S_IFREG:
inode->i_op = &v9fs_file_inode_operations;
inode->i_fop = &v9fs_file_operations;
break;
case S_IFLNK:
if (!v9fs_extended(v9ses)) {
P9_DPRINTK(P9_DEBUG_ERROR,
"extended modes used w/o 9P2000.u\n");
err = -EINVAL;
goto error;
}
inode->i_op = &v9fs_symlink_inode_operations;
break;
case S_IFDIR:
inc_nlink(inode);
if (v9fs_extended(v9ses))
inode->i_op = &v9fs_dir_inode_operations_ext;
else
inode->i_op = &v9fs_dir_inode_operations;
inode->i_fop = &v9fs_dir_operations;
break;
default:
P9_DPRINTK(P9_DEBUG_ERROR, "BAD mode 0x%x S_IFMT 0x%x\n",
mode, mode & S_IFMT);
err = -EINVAL;
goto error;
}

return inode;

error:
iput(inode);
return ERR_PTR(err);
}

/*
Expand Down Expand Up @@ -338,30 +344,25 @@ v9fs_inode_from_fid(struct v9fs_session_info *v9ses, struct p9_fid *fid,

ret = NULL;
st = p9_client_stat(fid);
if (IS_ERR(st)) {
err = PTR_ERR(st);
st = NULL;
goto error;
}
if (IS_ERR(st))
return ERR_CAST(st);

umode = p9mode2unixmode(v9ses, st->mode);
ret = v9fs_get_inode(sb, umode);
if (IS_ERR(ret)) {
err = PTR_ERR(ret);
ret = NULL;
goto error;
}

v9fs_stat2inode(st, ret, sb);
ret->i_ino = v9fs_qid2ino(&st->qid);
p9stat_free(st);
kfree(st);
return ret;

error:
p9stat_free(st);
kfree(st);
if (ret)
iput(ret);

return ERR_PTR(err);
}

Expand Down Expand Up @@ -403,9 +404,9 @@ v9fs_open_created(struct inode *inode, struct file *file)
* @v9ses: session information
* @dir: directory that dentry is being created in
* @dentry: dentry that is being created
* @extension: 9p2000.u extension string to support devices, etc.
* @perm: create permissions
* @mode: open mode
* @extension: 9p2000.u extension string to support devices, etc.
*
*/
static struct p9_fid *
Expand Down Expand Up @@ -470,7 +471,10 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
dentry->d_op = &v9fs_dentry_operations;

d_instantiate(dentry, inode);
v9fs_fid_add(dentry, fid);
err = v9fs_fid_add(dentry, fid);
if (err < 0)
goto error;

return ofid;

error:
Expand Down
Loading

0 comments on commit 80438ca

Please sign in to comment.