mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 04:06:22 +00:00
[PATCH] struct path: convert ocfs2
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
6db5fc5d53
commit
d28c91740a
4 changed files with 22 additions and 22 deletions
|
@ -595,7 +595,7 @@ static void ocfs2_dio_end_io(struct kiocb *iocb,
|
||||||
ssize_t bytes,
|
ssize_t bytes,
|
||||||
void *private)
|
void *private)
|
||||||
{
|
{
|
||||||
struct inode *inode = iocb->ki_filp->f_dentry->d_inode;
|
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
|
||||||
|
|
||||||
/* this io's submitter should not have unlocked this before we could */
|
/* this io's submitter should not have unlocked this before we could */
|
||||||
BUG_ON(!ocfs2_iocb_is_rw_locked(iocb));
|
BUG_ON(!ocfs2_iocb_is_rw_locked(iocb));
|
||||||
|
@ -611,7 +611,7 @@ static ssize_t ocfs2_direct_IO(int rw,
|
||||||
unsigned long nr_segs)
|
unsigned long nr_segs)
|
||||||
{
|
{
|
||||||
struct file *file = iocb->ki_filp;
|
struct file *file = iocb->ki_filp;
|
||||||
struct inode *inode = file->f_dentry->d_inode->i_mapping->host;
|
struct inode *inode = file->f_path.dentry->d_inode->i_mapping->host;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
mlog_entry_void();
|
mlog_entry_void();
|
||||||
|
|
|
@ -79,7 +79,7 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir)
|
||||||
struct buffer_head * bh, * tmp;
|
struct buffer_head * bh, * tmp;
|
||||||
struct ocfs2_dir_entry * de;
|
struct ocfs2_dir_entry * de;
|
||||||
int err;
|
int err;
|
||||||
struct inode *inode = filp->f_dentry->d_inode;
|
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||||
struct super_block * sb = inode->i_sb;
|
struct super_block * sb = inode->i_sb;
|
||||||
unsigned int ra_sectors = 16;
|
unsigned int ra_sectors = 16;
|
||||||
int lock_level = 0;
|
int lock_level = 0;
|
||||||
|
|
|
@ -176,7 +176,7 @@ static ssize_t dlmfs_file_read(struct file *filp,
|
||||||
int bytes_left;
|
int bytes_left;
|
||||||
ssize_t readlen;
|
ssize_t readlen;
|
||||||
char *lvb_buf;
|
char *lvb_buf;
|
||||||
struct inode *inode = filp->f_dentry->d_inode;
|
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||||
|
|
||||||
mlog(0, "inode %lu, count = %zu, *ppos = %llu\n",
|
mlog(0, "inode %lu, count = %zu, *ppos = %llu\n",
|
||||||
inode->i_ino, count, *ppos);
|
inode->i_ino, count, *ppos);
|
||||||
|
@ -220,7 +220,7 @@ static ssize_t dlmfs_file_write(struct file *filp,
|
||||||
int bytes_left;
|
int bytes_left;
|
||||||
ssize_t writelen;
|
ssize_t writelen;
|
||||||
char *lvb_buf;
|
char *lvb_buf;
|
||||||
struct inode *inode = filp->f_dentry->d_inode;
|
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||||
|
|
||||||
mlog(0, "inode %lu, count = %zu, *ppos = %llu\n",
|
mlog(0, "inode %lu, count = %zu, *ppos = %llu\n",
|
||||||
inode->i_ino, count, *ppos);
|
inode->i_ino, count, *ppos);
|
||||||
|
|
|
@ -68,7 +68,7 @@ static int ocfs2_file_open(struct inode *inode, struct file *file)
|
||||||
struct ocfs2_inode_info *oi = OCFS2_I(inode);
|
struct ocfs2_inode_info *oi = OCFS2_I(inode);
|
||||||
|
|
||||||
mlog_entry("(0x%p, 0x%p, '%.*s')\n", inode, file,
|
mlog_entry("(0x%p, 0x%p, '%.*s')\n", inode, file,
|
||||||
file->f_dentry->d_name.len, file->f_dentry->d_name.name);
|
file->f_path.dentry->d_name.len, file->f_path.dentry->d_name.name);
|
||||||
|
|
||||||
spin_lock(&oi->ip_lock);
|
spin_lock(&oi->ip_lock);
|
||||||
|
|
||||||
|
@ -98,8 +98,8 @@ static int ocfs2_file_release(struct inode *inode, struct file *file)
|
||||||
struct ocfs2_inode_info *oi = OCFS2_I(inode);
|
struct ocfs2_inode_info *oi = OCFS2_I(inode);
|
||||||
|
|
||||||
mlog_entry("(0x%p, 0x%p, '%.*s')\n", inode, file,
|
mlog_entry("(0x%p, 0x%p, '%.*s')\n", inode, file,
|
||||||
file->f_dentry->d_name.len,
|
file->f_path.dentry->d_name.len,
|
||||||
file->f_dentry->d_name.name);
|
file->f_path.dentry->d_name.name);
|
||||||
|
|
||||||
spin_lock(&oi->ip_lock);
|
spin_lock(&oi->ip_lock);
|
||||||
if (!--oi->ip_open_count)
|
if (!--oi->ip_open_count)
|
||||||
|
@ -1131,13 +1131,13 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
|
||||||
{
|
{
|
||||||
int ret, rw_level, have_alloc_sem = 0;
|
int ret, rw_level, have_alloc_sem = 0;
|
||||||
struct file *filp = iocb->ki_filp;
|
struct file *filp = iocb->ki_filp;
|
||||||
struct inode *inode = filp->f_dentry->d_inode;
|
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||||
int appending = filp->f_flags & O_APPEND ? 1 : 0;
|
int appending = filp->f_flags & O_APPEND ? 1 : 0;
|
||||||
|
|
||||||
mlog_entry("(0x%p, %u, '%.*s')\n", filp,
|
mlog_entry("(0x%p, %u, '%.*s')\n", filp,
|
||||||
(unsigned int)nr_segs,
|
(unsigned int)nr_segs,
|
||||||
filp->f_dentry->d_name.len,
|
filp->f_path.dentry->d_name.len,
|
||||||
filp->f_dentry->d_name.name);
|
filp->f_path.dentry->d_name.name);
|
||||||
|
|
||||||
/* happy write of zero bytes */
|
/* happy write of zero bytes */
|
||||||
if (iocb->ki_left == 0)
|
if (iocb->ki_left == 0)
|
||||||
|
@ -1159,7 +1159,7 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ocfs2_prepare_inode_for_write(filp->f_dentry, &iocb->ki_pos,
|
ret = ocfs2_prepare_inode_for_write(filp->f_path.dentry, &iocb->ki_pos,
|
||||||
iocb->ki_left, appending);
|
iocb->ki_left, appending);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
mlog_errno(ret);
|
mlog_errno(ret);
|
||||||
|
@ -1207,12 +1207,12 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct inode *inode = out->f_dentry->d_inode;
|
struct inode *inode = out->f_path.dentry->d_inode;
|
||||||
|
|
||||||
mlog_entry("(0x%p, 0x%p, %u, '%.*s')\n", out, pipe,
|
mlog_entry("(0x%p, 0x%p, %u, '%.*s')\n", out, pipe,
|
||||||
(unsigned int)len,
|
(unsigned int)len,
|
||||||
out->f_dentry->d_name.len,
|
out->f_path.dentry->d_name.len,
|
||||||
out->f_dentry->d_name.name);
|
out->f_path.dentry->d_name.name);
|
||||||
|
|
||||||
inode_double_lock(inode, pipe->inode);
|
inode_double_lock(inode, pipe->inode);
|
||||||
|
|
||||||
|
@ -1222,7 +1222,7 @@ static ssize_t ocfs2_file_splice_write(struct pipe_inode_info *pipe,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ocfs2_prepare_inode_for_write(out->f_dentry, ppos, len, 0);
|
ret = ocfs2_prepare_inode_for_write(out->f_path.dentry, ppos, len, 0);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
mlog_errno(ret);
|
mlog_errno(ret);
|
||||||
goto out_unlock;
|
goto out_unlock;
|
||||||
|
@ -1247,12 +1247,12 @@ static ssize_t ocfs2_file_splice_read(struct file *in,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct inode *inode = in->f_dentry->d_inode;
|
struct inode *inode = in->f_path.dentry->d_inode;
|
||||||
|
|
||||||
mlog_entry("(0x%p, 0x%p, %u, '%.*s')\n", in, pipe,
|
mlog_entry("(0x%p, 0x%p, %u, '%.*s')\n", in, pipe,
|
||||||
(unsigned int)len,
|
(unsigned int)len,
|
||||||
in->f_dentry->d_name.len,
|
in->f_path.dentry->d_name.len,
|
||||||
in->f_dentry->d_name.name);
|
in->f_path.dentry->d_name.name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See the comment in ocfs2_file_aio_read()
|
* See the comment in ocfs2_file_aio_read()
|
||||||
|
@ -1278,12 +1278,12 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb,
|
||||||
{
|
{
|
||||||
int ret = 0, rw_level = -1, have_alloc_sem = 0, lock_level = 0;
|
int ret = 0, rw_level = -1, have_alloc_sem = 0, lock_level = 0;
|
||||||
struct file *filp = iocb->ki_filp;
|
struct file *filp = iocb->ki_filp;
|
||||||
struct inode *inode = filp->f_dentry->d_inode;
|
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||||
|
|
||||||
mlog_entry("(0x%p, %u, '%.*s')\n", filp,
|
mlog_entry("(0x%p, %u, '%.*s')\n", filp,
|
||||||
(unsigned int)nr_segs,
|
(unsigned int)nr_segs,
|
||||||
filp->f_dentry->d_name.len,
|
filp->f_path.dentry->d_name.len,
|
||||||
filp->f_dentry->d_name.name);
|
filp->f_path.dentry->d_name.name);
|
||||||
|
|
||||||
if (!inode) {
|
if (!inode) {
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
|
Loading…
Reference in a new issue