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
fa3c791d
Commit
fa3c791d
authored
Jan 31, 2006
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
git://oss.sgi.com:8090/oss/git/xfs-2.6
parents
bd3f8f2b
fad3aa1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
18 deletions
+39
-18
fs/xfs/linux-2.6/xfs_buf.c
fs/xfs/linux-2.6/xfs_buf.c
+7
-0
fs/xfs/linux-2.6/xfs_iops.c
fs/xfs/linux-2.6/xfs_iops.c
+32
-18
No files found.
fs/xfs/linux-2.6/xfs_buf.c
View file @
fa3c791d
...
@@ -822,6 +822,13 @@ xfs_buf_rele(
...
@@ -822,6 +822,13 @@ xfs_buf_rele(
XB_TRACE
(
bp
,
"rele"
,
bp
->
b_relse
);
XB_TRACE
(
bp
,
"rele"
,
bp
->
b_relse
);
if
(
unlikely
(
!
hash
))
{
ASSERT
(
!
bp
->
b_relse
);
if
(
atomic_dec_and_test
(
&
bp
->
b_hold
))
xfs_buf_free
(
bp
);
return
;
}
if
(
atomic_dec_and_lock
(
&
bp
->
b_hold
,
&
hash
->
bh_lock
))
{
if
(
atomic_dec_and_lock
(
&
bp
->
b_hold
,
&
hash
->
bh_lock
))
{
if
(
bp
->
b_relse
)
{
if
(
bp
->
b_relse
)
{
atomic_inc
(
&
bp
->
b_hold
);
atomic_inc
(
&
bp
->
b_hold
);
...
...
fs/xfs/linux-2.6/xfs_iops.c
View file @
fa3c791d
...
@@ -262,6 +262,31 @@ has_fs_struct(struct task_struct *task)
...
@@ -262,6 +262,31 @@ has_fs_struct(struct task_struct *task)
return
(
task
->
fs
!=
init_task
.
fs
);
return
(
task
->
fs
!=
init_task
.
fs
);
}
}
STATIC
inline
void
cleanup_inode
(
vnode_t
*
dvp
,
vnode_t
*
vp
,
struct
dentry
*
dentry
,
int
mode
)
{
struct
dentry
teardown
=
{};
int
err2
;
/* Oh, the horror.
* If we can't add the ACL or we fail in
* linvfs_init_security we must back out.
* ENOSPC can hit here, among other things.
*/
teardown
.
d_inode
=
LINVFS_GET_IP
(
vp
);
teardown
.
d_name
=
dentry
->
d_name
;
if
(
S_ISDIR
(
mode
))
VOP_RMDIR
(
dvp
,
&
teardown
,
NULL
,
err2
);
else
VOP_REMOVE
(
dvp
,
&
teardown
,
NULL
,
err2
);
VN_RELE
(
vp
);
}
STATIC
int
STATIC
int
linvfs_mknod
(
linvfs_mknod
(
struct
inode
*
dir
,
struct
inode
*
dir
,
...
@@ -316,30 +341,19 @@ linvfs_mknod(
...
@@ -316,30 +341,19 @@ linvfs_mknod(
}
}
if
(
!
error
)
if
(
!
error
)
{
error
=
linvfs_init_security
(
vp
,
dir
);
error
=
linvfs_init_security
(
vp
,
dir
);
if
(
error
)
cleanup_inode
(
dvp
,
vp
,
dentry
,
mode
);
}
if
(
default_acl
)
{
if
(
default_acl
)
{
if
(
!
error
)
{
if
(
!
error
)
{
error
=
_ACL_INHERIT
(
vp
,
&
va
,
default_acl
);
error
=
_ACL_INHERIT
(
vp
,
&
va
,
default_acl
);
if
(
!
error
)
{
if
(
!
error
)
VMODIFY
(
vp
);
VMODIFY
(
vp
);
}
else
{
else
struct
dentry
teardown
=
{};
cleanup_inode
(
dvp
,
vp
,
dentry
,
mode
);
int
err2
;
/* Oh, the horror.
* If we can't add the ACL we must back out.
* ENOSPC can hit here, among other things.
*/
teardown
.
d_inode
=
ip
=
LINVFS_GET_IP
(
vp
);
teardown
.
d_name
=
dentry
->
d_name
;
if
(
S_ISDIR
(
mode
))
VOP_RMDIR
(
dvp
,
&
teardown
,
NULL
,
err2
);
else
VOP_REMOVE
(
dvp
,
&
teardown
,
NULL
,
err2
);
VN_RELE
(
vp
);
}
}
}
_ACL_FREE
(
default_acl
);
_ACL_FREE
(
default_acl
);
}
}
...
...
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