Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
linux
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Guillaume Tucker
linux
Commits
414cf718
Commit
414cf718
authored
Jun 08, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ufs_isblockset()
Cc: stable@vger.kernel.org Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
8785d84d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
fs/ufs/util.h
fs/ufs/util.h
+7
-3
No files found.
fs/ufs/util.h
View file @
414cf718
...
...
@@ -473,15 +473,19 @@ static inline unsigned _ubh_find_last_zero_bit_(
static
inline
int
_ubh_isblockset_
(
struct
ufs_sb_private_info
*
uspi
,
struct
ufs_buffer_head
*
ubh
,
unsigned
begin
,
unsigned
block
)
{
u8
mask
;
switch
(
uspi
->
s_fpb
)
{
case
8
:
return
(
*
ubh_get_addr
(
ubh
,
begin
+
block
)
==
0xff
);
case
4
:
return
(
*
ubh_get_addr
(
ubh
,
begin
+
(
block
>>
1
))
==
(
0x0f
<<
((
block
&
0x01
)
<<
2
)));
mask
=
0x0f
<<
((
block
&
0x01
)
<<
2
);
return
(
*
ubh_get_addr
(
ubh
,
begin
+
(
block
>>
1
))
&
mask
)
==
mask
;
case
2
:
return
(
*
ubh_get_addr
(
ubh
,
begin
+
(
block
>>
2
))
==
(
0x03
<<
((
block
&
0x03
)
<<
1
)));
mask
=
0x03
<<
((
block
&
0x03
)
<<
1
);
return
(
*
ubh_get_addr
(
ubh
,
begin
+
(
block
>>
2
))
&
mask
)
==
mask
;
case
1
:
return
(
*
ubh_get_addr
(
ubh
,
begin
+
(
block
>>
3
))
==
(
0x01
<<
(
block
&
0x07
)));
mask
=
0x01
<<
(
block
&
0x07
);
return
(
*
ubh_get_addr
(
ubh
,
begin
+
(
block
>>
3
))
&
mask
)
==
mask
;
}
return
0
;
}
...
...
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