Skip to content

Commit

Permalink
fs/9p: Use generic_file_open with lookup_instantiate_filp
Browse files Browse the repository at this point in the history
We need to do O_LARGEFILE check even in case of 9p. Use the
generic_file_open helper

Signed-off-by: Aneesh Kumar K.V <[email protected]>
Signed-off-by: Venkateswararao Jujjuri <[email protected]>
Signed-off-by: Eric Van Hensbergen <[email protected]>
  • Loading branch information
kvaneesh authored and ericvh committed Oct 28, 2010
1 parent 9856af8 commit 877cb3d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,13 +564,6 @@ static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir)
return retval;
}

static int
v9fs_open_created(struct inode *inode, struct file *file)
{
return 0;
}


/**
* v9fs_create - Create a file
* @v9ses: session information
Expand Down Expand Up @@ -775,7 +768,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,

/* if we are opening a file, assign the open fid to the file */
if (nd && nd->flags & LOOKUP_OPEN) {
filp = lookup_instantiate_filp(nd, dentry, v9fs_open_created);
filp = lookup_instantiate_filp(nd, dentry, generic_file_open);
if (IS_ERR(filp)) {
p9_client_clunk(ofid);
return PTR_ERR(filp);
Expand Down Expand Up @@ -834,7 +827,7 @@ v9fs_vfs_create(struct inode *dir, struct dentry *dentry, int mode,

/* if we are opening a file, assign the open fid to the file */
if (nd && nd->flags & LOOKUP_OPEN) {
filp = lookup_instantiate_filp(nd, dentry, v9fs_open_created);
filp = lookup_instantiate_filp(nd, dentry, generic_file_open);
if (IS_ERR(filp)) {
err = PTR_ERR(filp);
goto error;
Expand Down

0 comments on commit 877cb3d

Please sign in to comment.