Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
4427f0c3
Commit
4427f0c3
authored
Jun 08, 2009
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repair bfs_write_inode(), switch bfs to simple_fsync()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
224c8866
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
fs/bfs/dir.c
fs/bfs/dir.c
+4
-4
fs/bfs/inode.c
fs/bfs/inode.c
+9
-3
No files found.
fs/bfs/dir.c
View file @
4427f0c3
...
...
@@ -79,7 +79,7 @@ static int bfs_readdir(struct file *f, void *dirent, filldir_t filldir)
const
struct
file_operations
bfs_dir_operations
=
{
.
read
=
generic_read_dir
,
.
readdir
=
bfs_readdir
,
.
fsync
=
fi
le_fsync
,
.
fsync
=
simp
le_fsync
,
.
llseek
=
generic_file_llseek
,
};
...
...
@@ -205,7 +205,7 @@ static int bfs_unlink(struct inode *dir, struct dentry *dentry)
inode
->
i_nlink
=
1
;
}
de
->
ino
=
0
;
mark_buffer_dirty
(
bh
);
mark_buffer_dirty
_inode
(
bh
,
dir
);
dir
->
i_ctime
=
dir
->
i_mtime
=
CURRENT_TIME_SEC
;
mark_inode_dirty
(
dir
);
inode
->
i_ctime
=
dir
->
i_ctime
;
...
...
@@ -267,7 +267,7 @@ static int bfs_rename(struct inode *old_dir, struct dentry *old_dentry,
new_inode
->
i_ctime
=
CURRENT_TIME_SEC
;
inode_dec_link_count
(
new_inode
);
}
mark_buffer_dirty
(
old_bh
);
mark_buffer_dirty
_inode
(
old_bh
,
old_dir
);
error
=
0
;
end_rename:
...
...
@@ -320,7 +320,7 @@ static int bfs_add_entry(struct inode *dir, const unsigned char *name,
for
(
i
=
0
;
i
<
BFS_NAMELEN
;
i
++
)
de
->
name
[
i
]
=
(
i
<
namelen
)
?
name
[
i
]
:
0
;
mark_buffer_dirty
(
bh
);
mark_buffer_dirty
_inode
(
bh
,
dir
);
brelse
(
bh
);
return
0
;
}
...
...
fs/bfs/inode.c
View file @
4427f0c3
...
...
@@ -98,14 +98,15 @@ error:
return
ERR_PTR
(
-
EIO
);
}
static
int
bfs_write_inode
(
struct
inode
*
inode
,
int
unused
)
static
int
bfs_write_inode
(
struct
inode
*
inode
,
int
wait
)
{
struct
bfs_sb_info
*
info
=
BFS_SB
(
inode
->
i_sb
);
unsigned
int
ino
=
(
u16
)
inode
->
i_ino
;
unsigned
long
i_sblock
;
struct
bfs_inode
*
di
;
struct
buffer_head
*
bh
;
int
block
,
off
;
struct
bfs_sb_info
*
info
=
BFS_SB
(
inode
->
i_sb
)
;
int
err
=
0
;
dprintf
(
"ino=%08x
\n
"
,
ino
);
...
...
@@ -146,9 +147,14 @@ static int bfs_write_inode(struct inode *inode, int unused)
di
->
i_eoffset
=
cpu_to_le32
(
i_sblock
*
BFS_BSIZE
+
inode
->
i_size
-
1
);
mark_buffer_dirty
(
bh
);
if
(
wait
)
{
sync_dirty_buffer
(
bh
);
if
(
buffer_req
(
bh
)
&&
!
buffer_uptodate
(
bh
))
err
=
-
EIO
;
}
brelse
(
bh
);
mutex_unlock
(
&
info
->
bfs_lock
);
return
0
;
return
err
;
}
static
void
bfs_delete_inode
(
struct
inode
*
inode
)
...
...
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