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
6b0d144f
Commit
6b0d144f
authored
Jun 08, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ufs: set correct ->s_maxsize
Cc: stable@vger.kernel.org Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
eb315d2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
fs/ufs/super.c
fs/ufs/super.c
+18
-0
No files found.
fs/ufs/super.c
View file @
6b0d144f
...
@@ -746,6 +746,23 @@ static void ufs_put_super(struct super_block *sb)
...
@@ -746,6 +746,23 @@ static void ufs_put_super(struct super_block *sb)
return
;
return
;
}
}
static
u64
ufs_max_bytes
(
struct
super_block
*
sb
)
{
struct
ufs_sb_private_info
*
uspi
=
UFS_SB
(
sb
)
->
s_uspi
;
int
bits
=
uspi
->
s_apbshift
;
u64
res
;
if
(
bits
>
21
)
res
=
~
0ULL
;
else
res
=
UFS_NDADDR
+
(
1LL
<<
bits
)
+
(
1LL
<<
(
2
*
bits
))
+
(
1LL
<<
(
3
*
bits
));
if
(
res
>=
(
MAX_LFS_FILESIZE
>>
uspi
->
s_bshift
))
return
MAX_LFS_FILESIZE
;
return
res
<<
uspi
->
s_bshift
;
}
static
int
ufs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
static
int
ufs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
{
struct
ufs_sb_info
*
sbi
;
struct
ufs_sb_info
*
sbi
;
...
@@ -1212,6 +1229,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
...
@@ -1212,6 +1229,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
"fast symlink size (%u)
\n
"
,
uspi
->
s_maxsymlinklen
);
"fast symlink size (%u)
\n
"
,
uspi
->
s_maxsymlinklen
);
uspi
->
s_maxsymlinklen
=
maxsymlen
;
uspi
->
s_maxsymlinklen
=
maxsymlen
;
}
}
sb
->
s_maxbytes
=
ufs_max_bytes
(
sb
);
sb
->
s_max_links
=
UFS_LINK_MAX
;
sb
->
s_max_links
=
UFS_LINK_MAX
;
inode
=
ufs_iget
(
sb
,
UFS_ROOTINO
);
inode
=
ufs_iget
(
sb
,
UFS_ROOTINO
);
...
...
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