Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
bf349a44
Commit
bf349a44
authored
Jun 25, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spufs: shift dget/mntget towards dentry_open()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
3b6456d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
28 deletions
+18
-28
arch/powerpc/platforms/cell/spufs/inode.c
arch/powerpc/platforms/cell/spufs/inode.c
+18
-28
No files found.
arch/powerpc/platforms/cell/spufs/inode.c
View file @
bf349a44
...
...
@@ -323,22 +323,21 @@ static int spufs_context_open(struct dentry *dentry, struct vfsmount *mnt)
struct
file
*
filp
;
ret
=
get_unused_fd
();
if
(
ret
<
0
)
{
dput
(
dentry
);
mntput
(
mnt
);
goto
out
;
}
if
(
ret
<
0
)
return
ret
;
filp
=
dentry_open
(
dentry
,
mnt
,
O_RDONLY
,
current_cred
());
/*
* get references for dget and mntget, will be released
* in error path of *_open().
*/
filp
=
dentry_open
(
dget
(
dentry
),
mntget
(
mnt
),
O_RDONLY
,
current_cred
());
if
(
IS_ERR
(
filp
))
{
put_unused_fd
(
ret
);
ret
=
PTR_ERR
(
filp
);
goto
out
;
return
PTR_ERR
(
filp
);
}
filp
->
f_op
=
&
spufs_context_fops
;
fd_install
(
ret
,
filp
);
out:
return
ret
;
}
...
...
@@ -495,11 +494,7 @@ spufs_create_context(struct inode *inode, struct dentry *dentry,
put_spu_context
(
neighbor
);
}
/*
* get references for dget and mntget, will be released
* in error path of *_open().
*/
ret
=
spufs_context_open
(
dget
(
dentry
),
mntget
(
mnt
));
ret
=
spufs_context_open
(
dentry
,
mnt
);
if
(
ret
<
0
)
{
WARN_ON
(
spufs_rmdir
(
inode
,
dentry
));
if
(
affinity
)
...
...
@@ -562,22 +557,21 @@ static int spufs_gang_open(struct dentry *dentry, struct vfsmount *mnt)
struct
file
*
filp
;
ret
=
get_unused_fd
();
if
(
ret
<
0
)
{
dput
(
dentry
);
mntput
(
mnt
);
goto
out
;
}
if
(
ret
<
0
)
return
ret
;
filp
=
dentry_open
(
dentry
,
mnt
,
O_RDONLY
,
current_cred
());
/*
* get references for dget and mntget, will be released
* in error path of *_open().
*/
filp
=
dentry_open
(
dget
(
dentry
),
mntget
(
mnt
),
O_RDONLY
,
current_cred
());
if
(
IS_ERR
(
filp
))
{
put_unused_fd
(
ret
);
ret
=
PTR_ERR
(
filp
);
goto
out
;
return
PTR_ERR
(
filp
);
}
filp
->
f_op
=
&
simple_dir_operations
;
fd_install
(
ret
,
filp
);
out:
return
ret
;
}
...
...
@@ -591,11 +585,7 @@ static int spufs_create_gang(struct inode *inode,
if
(
ret
)
goto
out
;
/*
* get references for dget and mntget, will be released
* in error path of *_open().
*/
ret
=
spufs_gang_open
(
dget
(
dentry
),
mntget
(
mnt
));
ret
=
spufs_gang_open
(
dentry
,
mnt
);
if
(
ret
<
0
)
{
int
err
=
simple_rmdir
(
inode
,
dentry
);
WARN_ON
(
err
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment