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
dee0f2b2
Commit
dee0f2b2
authored
Mar 17, 2003
by
Eric Sandeen
Committed by
Stephen Lord
Mar 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Last of the dir2 backmerges from Irix
SGI Modid: 2.5.x-xfs:slinx:140918a
parent
2af62e92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
fs/xfs/xfs_dir2_node.c
fs/xfs/xfs_dir2_node.c
+18
-9
No files found.
fs/xfs/xfs_dir2_node.c
View file @
dee0f2b2
...
...
@@ -1512,7 +1512,7 @@ xfs_dir2_node_addname_int(
* If we don't have a data block, we need to allocate one and make
* the freespace entries refer to it.
*/
if
(
dbno
==
-
1
)
{
if
(
unlikely
(
dbno
==
-
1
)
)
{
/*
* Not allowed to allocate, return failure.
*/
...
...
@@ -1521,7 +1521,7 @@ xfs_dir2_node_addname_int(
* Drop the freespace buffer unless it came from our
* caller.
*/
if
(
fblk
==
NULL
||
fblk
->
bp
=
=
NULL
)
if
(
(
fblk
==
NULL
||
fblk
->
bp
==
NULL
)
&&
fbp
!
=
NULL
)
xfs_da_buf_done
(
fbp
);
return
XFS_ERROR
(
ENOSPC
);
}
...
...
@@ -1535,7 +1535,7 @@ xfs_dir2_node_addname_int(
* Drop the freespace buffer unless it came from our
* caller.
*/
if
(
fblk
==
NULL
||
fblk
->
bp
=
=
NULL
)
if
(
(
fblk
==
NULL
||
fblk
->
bp
==
NULL
)
&&
fbp
!
=
NULL
)
xfs_da_buf_done
(
fbp
);
return
error
;
}
...
...
@@ -1552,7 +1552,7 @@ xfs_dir2_node_addname_int(
fblk
->
bp
=
NULL
;
fbno
=
XFS_DIR2_DB_TO_FDB
(
mp
,
dbno
);
if
((
error
=
xfs_da_read_buf
(
tp
,
dp
,
XFS_DIR2_DB_TO_DA
(
mp
,
fbno
),
-
1
,
&
fbp
,
XFS_DIR2_DB_TO_DA
(
mp
,
fbno
),
-
2
,
&
fbp
,
XFS_DATA_FORK
)))
{
xfs_da_buf_done
(
dbp
);
return
error
;
...
...
@@ -1659,16 +1659,17 @@ xfs_dir2_node_addname_int(
* If just checking, we succeeded.
*/
if
(
args
->
justcheck
)
{
if
(
fblk
==
NULL
||
fblk
->
bp
=
=
NULL
)
if
(
(
fblk
==
NULL
||
fblk
->
bp
==
NULL
)
&&
fbp
!
=
NULL
)
xfs_da_buf_done
(
fbp
);
return
0
;
}
/*
* Read the data block in.
*/
if
((
error
=
xfs_da_read_buf
(
tp
,
dp
,
XFS_DIR2_DB_TO_DA
(
mp
,
dbno
),
if
(
unlikely
(
error
=
xfs_da_read_buf
(
tp
,
dp
,
XFS_DIR2_DB_TO_DA
(
mp
,
dbno
),
-
1
,
&
dbp
,
XFS_DATA_FORK
)))
{
if
(
fblk
==
NULL
||
fblk
->
bp
=
=
NULL
)
if
(
(
fblk
==
NULL
||
fblk
->
bp
==
NULL
)
&&
fbp
!
=
NULL
)
xfs_da_buf_done
(
fbp
);
return
error
;
}
...
...
@@ -1723,7 +1724,7 @@ xfs_dir2_node_addname_int(
/*
* If the caller didn't hand us the freespace block, drop it.
*/
if
(
fblk
==
NULL
||
fblk
->
bp
=
=
NULL
)
if
(
(
fblk
==
NULL
||
fblk
->
bp
==
NULL
)
&&
fbp
!
=
NULL
)
xfs_da_buf_done
(
fbp
);
/*
* Return the data block and offset in args, then drop the data block.
...
...
@@ -1951,10 +1952,18 @@ xfs_dir2_node_trim_free(
/*
* Read the freespace block.
*/
if
(
(
error
=
xfs_da_read_buf
(
tp
,
dp
,
(
xfs_dablk_t
)
fo
,
-
1
,
&
bp
,
if
(
unlikely
(
error
=
xfs_da_read_buf
(
tp
,
dp
,
(
xfs_dablk_t
)
fo
,
-
2
,
&
bp
,
XFS_DATA_FORK
)))
{
return
error
;
}
/*
* There can be holes in freespace. If fo is a hole, there's
* nothing to do.
*/
if
(
bp
==
NULL
)
{
return
0
;
}
free
=
bp
->
data
;
ASSERT
(
INT_GET
(
free
->
hdr
.
magic
,
ARCH_CONVERT
)
==
XFS_DIR2_FREE_MAGIC
);
/*
...
...
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