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
a788a8ec
Commit
a788a8ec
authored
Oct 14, 2004
by
Christoph Hellwig
Committed by
Nathan Scott
Oct 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] fix a freeze/thaw deadlock
Signed-off-by:
Nathan Scott
<
nathans@sgi.com
>
parent
5dba7057
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
8 deletions
+11
-8
fs/xfs/linux-2.6/xfs_ioctl.c
fs/xfs/linux-2.6/xfs_ioctl.c
+4
-2
fs/xfs/linux-2.6/xfs_vfs.h
fs/xfs/linux-2.6/xfs_vfs.h
+4
-0
fs/xfs/xfs_fsops.c
fs/xfs/xfs_fsops.c
+1
-4
fs/xfs/xfs_log.c
fs/xfs/xfs_log.c
+1
-1
fs/xfs/xfs_trans.c
fs/xfs/xfs_trans.c
+1
-1
No files found.
fs/xfs/linux-2.6/xfs_ioctl.c
View file @
a788a8ec
...
@@ -818,12 +818,14 @@ xfs_ioctl(
...
@@ -818,12 +818,14 @@ xfs_ioctl(
if
(
!
capable
(
CAP_SYS_ADMIN
))
if
(
!
capable
(
CAP_SYS_ADMIN
))
return
-
EPERM
;
return
-
EPERM
;
if
(
inode
->
i_sb
->
s_frozen
==
SB_UNFROZEN
)
freeze_bdev
(
inode
->
i_sb
->
s_bdev
);
freeze_bdev
(
inode
->
i_sb
->
s_bdev
);
return
0
;
return
0
;
case
XFS_IOC_THAW
:
case
XFS_IOC_THAW
:
if
(
!
capable
(
CAP_SYS_ADMIN
))
if
(
!
capable
(
CAP_SYS_ADMIN
))
return
-
EPERM
;
return
-
EPERM
;
if
(
inode
->
i_sb
->
s_frozen
!=
SB_UNFROZEN
)
thaw_bdev
(
inode
->
i_sb
->
s_bdev
,
inode
->
i_sb
);
thaw_bdev
(
inode
->
i_sb
->
s_bdev
,
inode
->
i_sb
);
return
0
;
return
0
;
...
...
fs/xfs/linux-2.6/xfs_vfs.h
View file @
a788a8ec
...
@@ -216,4 +216,8 @@ extern void bhv_insert_all_vfsops(struct vfs *);
...
@@ -216,4 +216,8 @@ extern void bhv_insert_all_vfsops(struct vfs *);
extern
void
bhv_remove_all_vfsops
(
struct
vfs
*
,
int
);
extern
void
bhv_remove_all_vfsops
(
struct
vfs
*
,
int
);
extern
void
bhv_remove_vfsops
(
struct
vfs
*
,
int
);
extern
void
bhv_remove_vfsops
(
struct
vfs
*
,
int
);
#define fs_frozen(vfsp) ((vfsp)->vfs_super->s_frozen)
#define fs_check_frozen(vfsp, level) \
vfs_check_frozen(vfsp->vfs_super, level);
#endif
/* __XFS_VFS_H__ */
#endif
/* __XFS_VFS_H__ */
fs/xfs/xfs_fsops.c
View file @
a788a8ec
...
@@ -590,9 +590,6 @@ xfs_fs_goingdown(
...
@@ -590,9 +590,6 @@ xfs_fs_goingdown(
xfs_mount_t
*
mp
,
xfs_mount_t
*
mp
,
__uint32_t
inflags
)
__uint32_t
inflags
)
{
{
if
(
!
capable
(
CAP_SYS_ADMIN
))
return
-
EPERM
;
switch
(
inflags
)
{
switch
(
inflags
)
{
case
XFS_FSOP_GOING_FLAGS_DEFAULT
:
{
case
XFS_FSOP_GOING_FLAGS_DEFAULT
:
{
struct
vfs
*
vfsp
=
XFS_MTOVFS
(
mp
);
struct
vfs
*
vfsp
=
XFS_MTOVFS
(
mp
);
...
...
fs/xfs/xfs_log.c
View file @
a788a8ec
...
@@ -811,7 +811,7 @@ xfs_log_need_covered(xfs_mount_t *mp)
...
@@ -811,7 +811,7 @@ xfs_log_need_covered(xfs_mount_t *mp)
xlog_t
*
log
=
mp
->
m_log
;
xlog_t
*
log
=
mp
->
m_log
;
vfs_t
*
vfsp
=
XFS_MTOVFS
(
mp
);
vfs_t
*
vfsp
=
XFS_MTOVFS
(
mp
);
if
(
vfsp
->
vfs_super
->
s_frozen
||
XFS_FORCED_SHUTDOWN
(
mp
)
||
if
(
fs_frozen
(
vfsp
)
||
XFS_FORCED_SHUTDOWN
(
mp
)
||
(
vfsp
->
vfs_flag
&
VFS_RDONLY
))
(
vfsp
->
vfs_flag
&
VFS_RDONLY
))
return
0
;
return
0
;
...
...
fs/xfs/xfs_trans.c
View file @
a788a8ec
...
@@ -131,7 +131,7 @@ xfs_trans_alloc(
...
@@ -131,7 +131,7 @@ xfs_trans_alloc(
xfs_mount_t
*
mp
,
xfs_mount_t
*
mp
,
uint
type
)
uint
type
)
{
{
vfs_check_frozen
(
XFS_MTOVFS
(
mp
)
->
vfs_super
,
SB_FREEZE_TRANS
);
fs_check_frozen
(
XFS_MTOVFS
(
mp
)
,
SB_FREEZE_TRANS
);
atomic_inc
(
&
mp
->
m_active_trans
);
atomic_inc
(
&
mp
->
m_active_trans
);
return
(
_xfs_trans_alloc
(
mp
,
type
));
return
(
_xfs_trans_alloc
(
mp
,
type
));
...
...
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