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
5ecfcb26
Commit
5ecfcb26
authored
Apr 12, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
orangefs: don't open-code inode_lock/inode_unlock
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
7b9743eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
fs/orangefs/file.c
fs/orangefs/file.c
+2
-2
fs/orangefs/orangefs-kernel.h
fs/orangefs/orangefs-kernel.h
+2
-2
No files found.
fs/orangefs/file.c
View file @
5ecfcb26
...
@@ -445,7 +445,7 @@ static ssize_t orangefs_file_write_iter(struct kiocb *iocb, struct iov_iter *ite
...
@@ -445,7 +445,7 @@ static ssize_t orangefs_file_write_iter(struct kiocb *iocb, struct iov_iter *ite
gossip_debug
(
GOSSIP_FILE_DEBUG
,
"orangefs_file_write_iter
\n
"
);
gossip_debug
(
GOSSIP_FILE_DEBUG
,
"orangefs_file_write_iter
\n
"
);
mutex_lock
(
&
file
->
f_mapping
->
host
->
i_mutex
);
inode_lock
(
file
->
f_mapping
->
host
);
/* Make sure generic_write_checks sees an up to date inode size. */
/* Make sure generic_write_checks sees an up to date inode size. */
if
(
file
->
f_flags
&
O_APPEND
)
{
if
(
file
->
f_flags
&
O_APPEND
)
{
...
@@ -492,7 +492,7 @@ static ssize_t orangefs_file_write_iter(struct kiocb *iocb, struct iov_iter *ite
...
@@ -492,7 +492,7 @@ static ssize_t orangefs_file_write_iter(struct kiocb *iocb, struct iov_iter *ite
out:
out:
mutex_unlock
(
&
file
->
f_mapping
->
host
->
i_mutex
);
inode_unlock
(
file
->
f_mapping
->
host
);
return
rc
;
return
rc
;
}
}
...
...
fs/orangefs/orangefs-kernel.h
View file @
5ecfcb26
...
@@ -612,11 +612,11 @@ do { \
...
@@ -612,11 +612,11 @@ do { \
static
inline
void
orangefs_i_size_write
(
struct
inode
*
inode
,
loff_t
i_size
)
static
inline
void
orangefs_i_size_write
(
struct
inode
*
inode
,
loff_t
i_size
)
{
{
#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
mutex_lock
(
&
inode
->
i_mutex
);
inode_lock
(
inode
);
#endif
#endif
i_size_write
(
inode
,
i_size
);
i_size_write
(
inode
,
i_size
);
#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
mutex_unlock
(
&
inode
->
i_mutex
);
inode_unlock
(
inode
);
#endif
#endif
}
}
...
...
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