git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
s390
/
hypfs
/
inode.c
diff --git
a/arch/s390/hypfs/inode.c
b/arch/s390/hypfs/inode.c
index
666b946
..
b6716c4
100644
(file)
--- a/
arch/s390/hypfs/inode.c
+++ b/
arch/s390/hypfs/inode.c
@@
-1,5
+1,5
@@
/*
/*
- *
fs
/hypfs/inode.c
+ *
arch/s390
/hypfs/inode.c
* Hypervisor filesystem for Linux on s390.
*
* Copyright (C) IBM Corp. 2006
* Hypervisor filesystem for Linux on s390.
*
* Copyright (C) IBM Corp. 2006
@@
-109,7
+109,7
@@
static void hypfs_drop_inode(struct inode *inode)
static int hypfs_open(struct inode *inode, struct file *filp)
{
static int hypfs_open(struct inode *inode, struct file *filp)
{
- char *data = filp->f_dentry->d_inode->i_private;
+ char *data = filp->f_
path.
dentry->d_inode->i_private;
struct hypfs_sb_info *fs_info;
if (filp->f_mode & FMODE_WRITE) {
struct hypfs_sb_info *fs_info;
if (filp->f_mode & FMODE_WRITE) {
@@
-134,12
+134,20
@@
static int hypfs_open(struct inode *inode, struct file *filp)
return 0;
}
return 0;
}
-static ssize_t hypfs_aio_read(struct kiocb *iocb,
__user char *buf
,
-
size_t count
, loff_t offset)
+static ssize_t hypfs_aio_read(struct kiocb *iocb,
const struct iovec *iov
,
+
unsigned long nr_segs
, loff_t offset)
{
char *data;
size_t len;
struct file *filp = iocb->ki_filp;
{
char *data;
size_t len;
struct file *filp = iocb->ki_filp;
+ /* XXX: temporary */
+ char __user *buf = iov[0].iov_base;
+ size_t count = iov[0].iov_len;
+
+ if (nr_segs != 1) {
+ count = -EINVAL;
+ goto out;
+ }
data = filp->private_data;
len = strlen(data);
data = filp->private_data;
len = strlen(data);
@@
-158,14
+166,15
@@
static ssize_t hypfs_aio_read(struct kiocb *iocb, __user char *buf,
out:
return count;
}
out:
return count;
}
-static ssize_t hypfs_aio_write(struct kiocb *iocb, const
char __user *buf
,
-
size_t count, loff_t pos
)
+static ssize_t hypfs_aio_write(struct kiocb *iocb, const
struct iovec *iov
,
+
unsigned long nr_segs, loff_t offset
)
{
int rc;
struct super_block *sb;
struct hypfs_sb_info *fs_info;
{
int rc;
struct super_block *sb;
struct hypfs_sb_info *fs_info;
+ size_t count = iov_length(iov, nr_segs);
- sb = iocb->ki_filp->f_dentry->d_inode->i_sb;
+ sb = iocb->ki_filp->f_
path.
dentry->d_inode->i_sb;
fs_info = sb->s_fs_info;
/*
* Currently we only allow one update per second for two reasons:
fs_info = sb->s_fs_info;
/*
* Currently we only allow one update per second for two reasons:
@@
-311,10
+320,12
@@
static void hypfs_kill_super(struct super_block *sb)
{
struct hypfs_sb_info *sb_info = sb->s_fs_info;
{
struct hypfs_sb_info *sb_info = sb->s_fs_info;
- hypfs_delete_tree(sb->s_root);
- hypfs_remove(sb_info->update_file);
- kfree(sb->s_fs_info);
- sb->s_fs_info = NULL;
+ if (sb->s_root) {
+ hypfs_delete_tree(sb->s_root);
+ hypfs_remove(sb_info->update_file);
+ kfree(sb->s_fs_info);
+ sb->s_fs_info = NULL;
+ }
kill_litter_super(sb);
}
kill_litter_super(sb);
}