diff options
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r-- | fs/9p/vfs_inode.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 62ce8daefa95..2b05651e0c3d 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -858,12 +858,11 @@ error: | |||
858 | 858 | ||
859 | static int | 859 | static int |
860 | v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry, | 860 | v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry, |
861 | struct opendata *od, unsigned flags, umode_t mode, | 861 | struct file *file, unsigned flags, umode_t mode, |
862 | int *opened) | 862 | int *opened) |
863 | { | 863 | { |
864 | int err; | 864 | int err; |
865 | u32 perm; | 865 | u32 perm; |
866 | struct file *filp; | ||
867 | struct v9fs_inode *v9inode; | 866 | struct v9fs_inode *v9inode; |
868 | struct v9fs_session_info *v9ses; | 867 | struct v9fs_session_info *v9ses; |
869 | struct p9_fid *fid, *inode_fid; | 868 | struct p9_fid *fid, *inode_fid; |
@@ -880,7 +879,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry, | |||
880 | 879 | ||
881 | /* Only creates */ | 880 | /* Only creates */ |
882 | if (!(flags & O_CREAT) || dentry->d_inode) { | 881 | if (!(flags & O_CREAT) || dentry->d_inode) { |
883 | finish_no_open(od, res); | 882 | finish_no_open(file, res); |
884 | return 1; | 883 | return 1; |
885 | } | 884 | } |
886 | 885 | ||
@@ -918,16 +917,14 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry, | |||
918 | v9inode->writeback_fid = (void *) inode_fid; | 917 | v9inode->writeback_fid = (void *) inode_fid; |
919 | } | 918 | } |
920 | mutex_unlock(&v9inode->v_mutex); | 919 | mutex_unlock(&v9inode->v_mutex); |
921 | filp = finish_open(od, dentry, generic_file_open, opened); | 920 | err = finish_open(file, dentry, generic_file_open, opened); |
922 | if (IS_ERR(filp)) { | 921 | if (err) |
923 | err = PTR_ERR(filp); | ||
924 | goto error; | 922 | goto error; |
925 | } | ||
926 | 923 | ||
927 | filp->private_data = fid; | 924 | file->private_data = fid; |
928 | #ifdef CONFIG_9P_FSCACHE | 925 | #ifdef CONFIG_9P_FSCACHE |
929 | if (v9ses->cache) | 926 | if (v9ses->cache) |
930 | v9fs_cache_inode_set_cookie(dentry->d_inode, filp); | 927 | v9fs_cache_inode_set_cookie(dentry->d_inode, file); |
931 | #endif | 928 | #endif |
932 | 929 | ||
933 | *opened |= FILE_CREATED; | 930 | *opened |= FILE_CREATED; |