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
Kirill Smelkov
linux
Commits
07f08be5
Commit
07f08be5
authored
Mar 26, 2003
by
Nathan Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] whitespace and code formatting changes
parent
a3510967
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
191 additions
and
129 deletions
+191
-129
fs/xfs/linux/xfs_super.c
fs/xfs/linux/xfs_super.c
+18
-61
fs/xfs/linux/xfs_super.h
fs/xfs/linux/xfs_super.h
+0
-4
fs/xfs/linux/xfs_vfs.c
fs/xfs/linux/xfs_vfs.c
+132
-30
fs/xfs/linux/xfs_vfs.h
fs/xfs/linux/xfs_vfs.h
+4
-0
fs/xfs/linux/xfs_vnode.c
fs/xfs/linux/xfs_vnode.c
+36
-34
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.c
+1
-0
No files found.
fs/xfs/linux/xfs_super.c
View file @
07f08be5
...
...
@@ -40,6 +40,7 @@
STATIC
struct
quotactl_ops
linvfs_qops
;
STATIC
struct
super_operations
linvfs_sops
;
STATIC
struct
export_operations
linvfs_export_ops
;
STATIC
kmem_cache_t
*
linvfs_inode_cachep
;
#define MNTOPT_LOGBUFS "logbufs"
/* number of XFS log buffers */
#define MNTOPT_LOGBSIZE "logbsize"
/* size of XFS log buffers */
...
...
@@ -320,11 +321,11 @@ xfs_set_inodeops(
STATIC
__inline__
void
xfs_revalidate_inode
(
xfs_mount_t
*
mp
,
vnode_t
*
vp
,
xfs_inode_t
*
ip
)
xfs_mount_t
*
mp
,
vnode_t
*
vp
,
xfs_inode_t
*
ip
)
{
struct
inode
*
inode
=
LINVFS_GET_IP
(
vp
);
struct
inode
*
inode
=
LINVFS_GET_IP
(
vp
);
inode
->
i_mode
=
(
ip
->
i_d
.
di_mode
&
MODEMASK
)
|
VTTOIF
(
vp
->
v_type
);
inode
->
i_nlink
=
ip
->
i_d
.
di_nlink
;
...
...
@@ -353,21 +354,22 @@ xfs_revalidate_inode(
void
xfs_initialize_vnode
(
bhv_desc_t
*
bdp
,
vnode_t
*
vp
,
bhv_desc_t
*
inode_bhv
,
int
unlock
)
bhv_desc_t
*
bdp
,
vnode_t
*
vp
,
bhv_desc_t
*
inode_bhv
,
int
unlock
)
{
xfs_inode_t
*
ip
=
XFS_BHVTOI
(
inode_bhv
);
struct
inode
*
inode
=
LINVFS_GET_IP
(
vp
);
xfs_inode_t
*
ip
=
XFS_BHVTOI
(
inode_bhv
);
struct
inode
*
inode
=
LINVFS_GET_IP
(
vp
);
if
(
inode_bhv
->
bd_vobj
==
NULL
)
{
if
(
!
inode_bhv
->
bd_vobj
)
{
vp
->
v_vfsp
=
bhvtovfs
(
bdp
);
bhv_desc_init
(
inode_bhv
,
ip
,
vp
,
&
xfs_vnodeops
);
bhv_insert
(
VN_BHV_HEAD
(
vp
),
inode_bhv
);
}
vp
->
v_type
=
IFTOVT
(
ip
->
i_d
.
di_mode
);
/* Have we been called during the new inode create process,
* in which case we are too early to fill in the Linux inode.
*/
...
...
@@ -466,8 +468,6 @@ xfs_alloc_buftarg(
return
btp
;
}
STATIC
kmem_cache_t
*
linvfs_inode_cachep
;
STATIC
__inline__
unsigned
int
gfp_mask
(
void
)
{
/* If we're not in a transaction, FS activity is ok */
...
...
@@ -475,7 +475,6 @@ STATIC __inline__ unsigned int gfp_mask(void)
return
GFP_KERNEL
;
}
STATIC
struct
inode
*
linvfs_alloc_inode
(
struct
super_block
*
sb
)
...
...
@@ -937,49 +936,6 @@ STATIC struct file_system_type xfs_fs_type = {
};
void
bhv_remove_vfsops
(
struct
vfs
*
vfsp
,
int
pos
)
{
struct
bhv_desc
*
bhv
;
bhv
=
bhv_lookup_range
(
&
vfsp
->
vfs_bh
,
pos
,
pos
);
if
(
!
bhv
)
return
;
bhv_remove
(
&
vfsp
->
vfs_bh
,
bhv
);
kmem_free
(
bhv
,
sizeof
(
*
bhv
));
}
void
bhv_remove_all_vfsops
(
struct
vfs
*
vfsp
,
int
freebase
)
{
struct
xfs_mount
*
mp
;
bhv_remove_vfsops
(
vfsp
,
VFS_POSITION_QM
);
bhv_remove_vfsops
(
vfsp
,
VFS_POSITION_DM
);
if
(
!
freebase
)
return
;
mp
=
XFS_BHVTOM
(
bhv_lookup
(
VFS_BHVHEAD
(
vfsp
),
&
xfs_vfsops
));
VFS_REMOVEBHV
(
vfsp
,
&
mp
->
m_bhv
);
xfs_mount_free
(
mp
,
0
);
}
void
bhv_insert_all_vfsops
(
struct
vfs
*
vfsp
)
{
struct
xfs_mount
*
mp
;
mp
=
xfs_mount_init
();
vfs_insertbhv
(
vfsp
,
&
mp
->
m_bhv
,
&
xfs_vfsops
,
mp
);
vfs_insertdmapi
(
vfsp
);
vfs_insertquota
(
vfsp
);
}
STATIC
int
__init
init_xfs_fs
(
void
)
{
...
...
@@ -1000,6 +956,10 @@ init_xfs_fs( void )
error
=
pagebuf_init
();
if
(
error
<
0
)
goto
undo_pagebuf
;
vn_init
();
xfs_init
();
error
=
vfs_initdmapi
();
if
(
error
<
0
)
goto
undo_dmapi
;
...
...
@@ -1007,9 +967,6 @@ init_xfs_fs( void )
if
(
error
<
0
)
goto
undo_quota
;
vn_init
();
xfs_init
();
error
=
register_filesystem
(
&
xfs_fs_type
);
if
(
error
)
goto
undo_fs
;
...
...
@@ -1030,8 +987,8 @@ init_xfs_fs( void )
STATIC
void
__exit
exit_xfs_fs
(
void
)
{
xfs_cleanup
();
unregister_filesystem
(
&
xfs_fs_type
);
xfs_cleanup
();
vfs_exitquota
();
vfs_exitdmapi
();
pagebuf_terminate
();
...
...
fs/xfs/linux/xfs_super.h
View file @
07f08be5
...
...
@@ -111,8 +111,4 @@ extern void xfs_free_buftarg(struct pb_target *);
extern
void
xfs_setsize_buftarg
(
struct
pb_target
*
,
unsigned
int
,
unsigned
int
);
extern
unsigned
int
xfs_getsize_buftarg
(
struct
pb_target
*
);
extern
void
bhv_insert_all_vfsops
(
struct
vfs
*
);
extern
void
bhv_remove_all_vfsops
(
struct
vfs
*
,
int
);
extern
void
bhv_remove_vfsops
(
struct
vfs
*
,
int
);
#endif
/* __XFS_SUPER_H__ */
fs/xfs/linux/xfs_vfs.c
View file @
07f08be5
...
...
@@ -33,9 +33,13 @@
#include <xfs.h>
int
vfs_mount
(
bhv_desc_t
*
bdp
,
struct
xfs_mount_args
*
args
,
struct
cred
*
cr
)
vfs_mount
(
struct
bhv_desc
*
bdp
,
struct
xfs_mount_args
*
args
,
struct
cred
*
cr
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_mount
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -43,9 +47,14 @@ vfs_mount(bhv_desc_t *bdp, struct xfs_mount_args *args, struct cred *cr)
}
int
vfs_parseargs
(
bhv_desc_t
*
bdp
,
char
*
s
,
struct
xfs_mount_args
*
args
,
int
f
)
vfs_parseargs
(
struct
bhv_desc
*
bdp
,
char
*
s
,
struct
xfs_mount_args
*
args
,
int
f
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_parseargs
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -53,9 +62,12 @@ vfs_parseargs(bhv_desc_t *bdp, char *s, struct xfs_mount_args *args, int f)
}
int
vfs_showargs
(
bhv_desc_t
*
bdp
,
struct
seq_file
*
m
)
vfs_showargs
(
struct
bhv_desc
*
bdp
,
struct
seq_file
*
m
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_showargs
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -63,9 +75,13 @@ vfs_showargs(bhv_desc_t *bdp, struct seq_file *m)
}
int
vfs_unmount
(
bhv_desc_t
*
bdp
,
int
fl
,
struct
cred
*
cr
)
vfs_unmount
(
struct
bhv_desc
*
bdp
,
int
fl
,
struct
cred
*
cr
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_unmount
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -73,9 +89,12 @@ vfs_unmount(bhv_desc_t *bdp, int fl, struct cred *cr)
}
int
vfs_root
(
bhv_desc_t
*
bdp
,
struct
vnode
**
vpp
)
vfs_root
(
struct
bhv_desc
*
bdp
,
struct
vnode
**
vpp
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_root
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -83,9 +102,13 @@ vfs_root(bhv_desc_t *bdp, struct vnode **vpp)
}
int
vfs_statvfs
(
bhv_desc_t
*
bdp
,
struct
statfs
*
sp
,
struct
vnode
*
vp
)
vfs_statvfs
(
struct
bhv_desc
*
bdp
,
struct
statfs
*
sp
,
struct
vnode
*
vp
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_statvfs
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -93,9 +116,13 @@ vfs_statvfs(bhv_desc_t *bdp, struct statfs *sp, struct vnode *vp)
}
int
vfs_sync
(
bhv_desc_t
*
bdp
,
int
fl
,
struct
cred
*
cr
)
vfs_sync
(
struct
bhv_desc
*
bdp
,
int
fl
,
struct
cred
*
cr
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_sync
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -103,9 +130,13 @@ vfs_sync(bhv_desc_t *bdp, int fl, struct cred *cr)
}
int
vfs_vget
(
bhv_desc_t
*
bdp
,
struct
vnode
**
vpp
,
struct
fid
*
fidp
)
vfs_vget
(
struct
bhv_desc
*
bdp
,
struct
vnode
**
vpp
,
struct
fid
*
fidp
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_vget
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -113,9 +144,12 @@ vfs_vget(bhv_desc_t *bdp, struct vnode **vpp, struct fid *fidp)
}
int
vfs_dmapiops
(
bhv_desc_t
*
bdp
,
caddr_t
addr
)
vfs_dmapiops
(
struct
bhv_desc
*
bdp
,
caddr_t
addr
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_dmapiops
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -123,9 +157,14 @@ vfs_dmapiops(bhv_desc_t *bdp, caddr_t addr)
}
int
vfs_quotactl
(
bhv_desc_t
*
bdp
,
int
cmd
,
int
id
,
caddr_t
addr
)
vfs_quotactl
(
struct
bhv_desc
*
bdp
,
int
cmd
,
int
id
,
caddr_t
addr
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_quotactl
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -133,9 +172,14 @@ vfs_quotactl(bhv_desc_t *bdp, int cmd, int id, caddr_t addr)
}
void
vfs_init_vnode
(
bhv_desc_t
*
bdp
,
struct
vnode
*
vp
,
bhv_desc_t
*
bp
,
int
unlock
)
vfs_init_vnode
(
struct
bhv_desc
*
bdp
,
struct
vnode
*
vp
,
struct
bhv_desc
*
bp
,
int
unlock
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_init_vnode
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -143,9 +187,14 @@ vfs_init_vnode(bhv_desc_t *bdp, struct vnode *vp, bhv_desc_t *bp, int unlock)
}
void
vfs_force_shutdown
(
bhv_desc_t
*
bdp
,
int
fl
,
char
*
file
,
int
line
)
vfs_force_shutdown
(
struct
bhv_desc
*
bdp
,
int
fl
,
char
*
file
,
int
line
)
{
bhv_desc_t
*
next
=
bdp
;
struct
bhv_desc
*
next
=
bdp
;
ASSERT
(
next
);
while
(
!
(
bhvtovfsops
(
next
))
->
vfs_force_shutdown
)
next
=
BHV_NEXT
(
next
);
...
...
@@ -153,31 +202,84 @@ vfs_force_shutdown(bhv_desc_t *bdp, int fl, char *file, int line)
}
vfs_t
*
vfs_allocate
(
void
)
vfs_allocate
(
void
)
{
vfs_t
*
vfsp
=
kmem_zalloc
(
sizeof
(
vfs_t
),
KM_SLEEP
);
struct
vfs
*
vfsp
;
vfsp
=
kmem_zalloc
(
sizeof
(
vfs_t
),
KM_SLEEP
);
bhv_head_init
(
VFS_BHVHEAD
(
vfsp
),
"vfs"
);
return
vfsp
;
}
void
vfs_deallocate
(
vfs_t
*
vfsp
)
vfs_deallocate
(
struct
vfs
*
vfsp
)
{
bhv_head_destroy
(
VFS_BHVHEAD
(
vfsp
));
kmem_free
(
vfsp
,
sizeof
(
vfs_t
));
}
void
vfs_insertops
(
vfs_t
*
vfsp
,
vfsops_t
*
vfsops
)
vfs_insertops
(
struct
vfs
*
vfsp
,
struct
vfsops
*
vfsops
)
{
bhv_desc_t
*
bdp
=
kmem_alloc
(
sizeof
(
bhv_desc_t
),
KM_SLEEP
);
struct
bhv_desc
*
bdp
;
bdp
=
kmem_alloc
(
sizeof
(
struct
bhv_desc
),
KM_SLEEP
);
bhv_desc_init
(
bdp
,
NULL
,
vfsp
,
vfsops
);
bhv_insert
(
&
vfsp
->
vfs_bh
,
bdp
);
}
void
vfs_insertbhv
(
vfs_t
*
vfsp
,
bhv_desc_t
*
bdp
,
vfsops_t
*
vfsops
,
void
*
mount
)
vfs_insertbhv
(
struct
vfs
*
vfsp
,
struct
bhv_desc
*
bdp
,
struct
vfsops
*
vfsops
,
void
*
mount
)
{
bhv_desc_init
(
bdp
,
mount
,
vfsp
,
vfsops
);
bhv_insert_initial
(
&
vfsp
->
vfs_bh
,
bdp
);
}
void
bhv_remove_vfsops
(
struct
vfs
*
vfsp
,
int
pos
)
{
struct
bhv_desc
*
bhv
;
bhv
=
bhv_lookup_range
(
&
vfsp
->
vfs_bh
,
pos
,
pos
);
if
(
!
bhv
)
return
;
bhv_remove
(
&
vfsp
->
vfs_bh
,
bhv
);
kmem_free
(
bhv
,
sizeof
(
*
bhv
));
}
void
bhv_remove_all_vfsops
(
struct
vfs
*
vfsp
,
int
freebase
)
{
struct
xfs_mount
*
mp
;
bhv_remove_vfsops
(
vfsp
,
VFS_POSITION_QM
);
bhv_remove_vfsops
(
vfsp
,
VFS_POSITION_DM
);
if
(
!
freebase
)
return
;
mp
=
XFS_BHVTOM
(
bhv_lookup
(
VFS_BHVHEAD
(
vfsp
),
&
xfs_vfsops
));
VFS_REMOVEBHV
(
vfsp
,
&
mp
->
m_bhv
);
xfs_mount_free
(
mp
,
0
);
}
void
bhv_insert_all_vfsops
(
struct
vfs
*
vfsp
)
{
struct
xfs_mount
*
mp
;
mp
=
xfs_mount_init
();
vfs_insertbhv
(
vfsp
,
&
mp
->
m_bhv
,
&
xfs_vfsops
,
mp
);
vfs_insertdmapi
(
vfsp
);
vfs_insertquota
(
vfsp
);
}
fs/xfs/linux/xfs_vfs.h
View file @
07f08be5
...
...
@@ -170,4 +170,8 @@ extern void vfs_deallocate(vfs_t *);
extern
void
vfs_insertops
(
vfs_t
*
,
vfsops_t
*
);
extern
void
vfs_insertbhv
(
vfs_t
*
,
bhv_desc_t
*
,
vfsops_t
*
,
void
*
);
extern
void
bhv_insert_all_vfsops
(
struct
vfs
*
);
extern
void
bhv_remove_all_vfsops
(
struct
vfs
*
,
int
);
extern
void
bhv_remove_vfsops
(
struct
vfs
*
,
int
);
#endif
/* __XFS_VFS_H__ */
fs/xfs/linux/xfs_vnode.c
View file @
07f08be5
/*
* Copyright (c) 2000-200
2
Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-200
3
Silicon Graphics, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
...
...
@@ -31,7 +31,6 @@
*/
#include <xfs.h>
#include <linux/pagemap.h>
uint64_t
vn_generation
;
/* vnode generation number */
...
...
@@ -73,19 +72,19 @@ vn_init(void)
* Clean a vnode of filesystem-specific data and prepare it for reuse.
*/
STATIC
int
vn_reclaim
(
struct
vnode
*
vp
)
vn_reclaim
(
struct
vnode
*
vp
)
{
int
error
;
int
error
;
XFS_STATS_INC
(
xfsstats
.
vn_reclaim
);
vn_trace_entry
(
vp
,
"vn_reclaim"
,
(
inst_t
*
)
__return_address
);
/*
* Only make the VOP_RECLAIM call if there are behaviors
* to call.
*/
if
(
vp
->
v_fbhv
!=
NULL
)
{
if
(
vp
->
v_fbhv
)
{
VOP_RECLAIM
(
vp
,
error
);
if
(
error
)
return
-
error
;
...
...
@@ -108,18 +107,19 @@ vn_reclaim(struct vnode *vp)
}
STATIC
void
vn_wakeup
(
struct
vnode
*
vp
)
vn_wakeup
(
struct
vnode
*
vp
)
{
VN_LOCK
(
vp
);
if
(
vp
->
v_flag
&
VWAIT
)
{
if
(
vp
->
v_flag
&
VWAIT
)
sv_broadcast
(
vptosync
(
vp
));
}
vp
->
v_flag
&=
~
(
VRECLM
|
VWAIT
|
VMODIFIED
);
VN_UNLOCK
(
vp
,
0
);
}
int
vn_wait
(
struct
vnode
*
vp
)
vn_wait
(
struct
vnode
*
vp
)
{
VN_LOCK
(
vp
);
if
(
vp
->
v_flag
&
(
VINACT
|
VRECLM
))
{
...
...
@@ -132,7 +132,8 @@ vn_wait(struct vnode *vp)
}
struct
vnode
*
vn_initialize
(
struct
inode
*
inode
)
vn_initialize
(
struct
inode
*
inode
)
{
struct
vnode
*
vp
=
LINVFS_GET_VP
(
inode
);
...
...
@@ -165,7 +166,9 @@ vn_initialize(struct inode *inode)
* Get a reference on a vnode.
*/
vnode_t
*
vn_get
(
struct
vnode
*
vp
,
vmap_t
*
vmap
)
vn_get
(
struct
vnode
*
vp
,
vmap_t
*
vmap
)
{
struct
inode
*
inode
;
...
...
@@ -175,7 +178,7 @@ vn_get(struct vnode *vp, vmap_t *vmap)
return
NULL
;
inode
=
ilookup
(
vmap
->
v_vfsp
->
vfs_super
,
vmap
->
v_ino
);
if
(
inode
==
NULL
)
/* Inode not present */
if
(
!
inode
)
/* Inode not present */
return
NULL
;
vn_trace_exit
(
vp
,
"vn_get"
,
(
inst_t
*
)
__return_address
);
...
...
@@ -187,11 +190,12 @@ vn_get(struct vnode *vp, vmap_t *vmap)
* Revalidate the Linux inode from the vnode.
*/
int
vn_revalidate
(
struct
vnode
*
vp
)
vn_revalidate
(
struct
vnode
*
vp
)
{
int
error
;
struct
inode
*
inode
;
vattr_t
va
;
int
error
;
vn_trace_entry
(
vp
,
"vn_revalidate"
,
(
inst_t
*
)
__return_address
);
ASSERT
(
vp
->
v_fbhv
!=
NULL
);
...
...
@@ -224,7 +228,9 @@ vn_revalidate(struct vnode *vp)
* get a handle (via vn_get) on the vnode (usually done via a mount/vfs lock).
*/
void
vn_purge
(
struct
vnode
*
vp
,
vmap_t
*
vmap
)
vn_purge
(
struct
vnode
*
vp
,
vmap_t
*
vmap
)
{
vn_trace_entry
(
vp
,
"vn_purge"
,
(
inst_t
*
)
__return_address
);
...
...
@@ -284,9 +290,10 @@ vn_purge(struct vnode *vp, vmap_t *vmap)
* Add a reference to a referenced vnode.
*/
struct
vnode
*
vn_hold
(
struct
vnode
*
vp
)
vn_hold
(
struct
vnode
*
vp
)
{
struct
inode
*
inode
;
struct
inode
*
inode
;
XFS_STATS_INC
(
xfsstats
.
vn_hold
);
...
...
@@ -302,10 +309,11 @@ vn_hold(struct vnode *vp)
* Call VOP_INACTIVE on last reference.
*/
void
vn_rele
(
struct
vnode
*
vp
)
vn_rele
(
struct
vnode
*
vp
)
{
int
vcnt
;
int
cache
;
int
vcnt
;
int
cache
;
XFS_STATS_INC
(
xfsstats
.
vn_rele
);
...
...
@@ -319,7 +327,7 @@ vn_rele(struct vnode *vp)
* that i_count won't be decremented after we
* return.
*/
if
(
vcnt
==
0
)
{
if
(
!
vcnt
)
{
/*
* As soon as we turn this on, noone can find us in vn_get
* until we turn off VINACT or VRECLM
...
...
@@ -331,19 +339,14 @@ vn_rele(struct vnode *vp)
* Do not make the VOP_INACTIVE call if there
* are no behaviors attached to the vnode to call.
*/
if
(
vp
->
v_fbhv
!=
NULL
)
{
if
(
vp
->
v_fbhv
)
VOP_INACTIVE
(
vp
,
NULL
,
cache
);
}
VN_LOCK
(
vp
);
if
(
vp
->
v_flag
&
VWAIT
)
{
if
(
vp
->
v_flag
&
VWAIT
)
{
sv_broadcast
(
vptosync
(
vp
));
}
}
if
(
vp
->
v_flag
&
VWAIT
)
sv_broadcast
(
vptosync
(
vp
));
vp
->
v_flag
&=
~
(
VINACT
|
VWAIT
|
VRECLM
|
VMODIFIED
);
}
VN_UNLOCK
(
vp
,
0
);
...
...
@@ -355,17 +358,16 @@ vn_rele(struct vnode *vp)
* Finish the removal of a vnode.
*/
void
vn_remove
(
struct
vnode
*
vp
)
vn_remove
(
struct
vnode
*
vp
)
{
/* REFERENCED */
vmap_t
vmap
;
vmap_t
vmap
;
/* Make sure we don't do this to the same vnode twice */
if
(
!
(
vp
->
v_fbhv
))
return
;
XFS_STATS_INC
(
xfsstats
.
vn_remove
);
vn_trace_exit
(
vp
,
"vn_remove"
,
(
inst_t
*
)
__return_address
);
/*
...
...
fs/xfs/xfs_mount.c
View file @
07f08be5
...
...
@@ -35,6 +35,7 @@
STATIC
void
xfs_mount_reset_sbqflags
(
xfs_mount_t
*
);
STATIC
void
xfs_mount_log_sbunit
(
xfs_mount_t
*
,
__int64_t
);
STATIC
int
xfs_uuid_mount
(
xfs_mount_t
*
);
STATIC
void
xfs_uuid_unmount
(
xfs_mount_t
*
mp
);
mutex_t
xfs_uuidtabmon
;
/* monitor for uuidtab */
STATIC
int
xfs_uuidtab_size
;
...
...
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