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
9ba118f5
Commit
9ba118f5
authored
Jan 14, 2003
by
Christoph Hellwig
Committed by
Christoph Hellwig
Jan 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] remove superlous MAXNAMELEN checks
SGI Modid: 2.5.x-xfs:slinx:135168a
parent
3ddfdcea
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
29 deletions
+4
-29
fs/xfs/linux/xfs_linux.h
fs/xfs/linux/xfs_linux.h
+0
-1
fs/xfs/xfs_dir.c
fs/xfs/xfs_dir.c
+0
-6
fs/xfs/xfs_dir2.c
fs/xfs/xfs_dir2.c
+2
-6
fs/xfs/xfs_rename.c
fs/xfs/xfs_rename.c
+0
-4
fs/xfs/xfs_vnodeops.c
fs/xfs/xfs_vnodeops.c
+2
-12
No files found.
fs/xfs/linux/xfs_linux.h
View file @
9ba118f5
...
...
@@ -170,7 +170,6 @@ typedef struct xfs_dirent { /* data from readdir() */
#define DEFAULT_PROJID 0
#define dfltprid DEFAULT_PROJID
#define MAXNAMELEN 256
#define MAXPATHLEN 1024
#define FINVIS 0x0100
/* don't update timestamps - XFS */
...
...
fs/xfs/xfs_dir.c
View file @
9ba118f5
...
...
@@ -386,9 +386,6 @@ xfs_dir_lookup(xfs_trans_t *trans, xfs_inode_t *dp, char *name, int namelen,
int
retval
;
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
if
(
namelen
>=
MAXNAMELEN
)
{
return
(
XFS_ERROR
(
EINVAL
));
}
XFS_STATS_INC
(
xfsstats
.
xs_dir_lookup
);
/*
...
...
@@ -479,9 +476,6 @@ xfs_dir_replace(xfs_trans_t *trans, xfs_inode_t *dp, char *name, int namelen,
int
retval
;
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
if
(
namelen
>=
MAXNAMELEN
)
{
return
(
XFS_ERROR
(
EINVAL
));
}
if
((
retval
=
xfs_dir_ino_validate
(
trans
->
t_mountp
,
inum
)))
return
retval
;
...
...
fs/xfs/xfs_dir2.c
View file @
9ba118f5
...
...
@@ -232,10 +232,8 @@ xfs_dir2_lookup(
int
v
;
/* type-checking value */
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
if
(
namelen
>=
MAXNAMELEN
)
{
return
XFS_ERROR
(
EINVAL
);
}
XFS_STATS_INC
(
xfsstats
.
xs_dir_lookup
);
/*
* Fill in the arg structure for this request.
*/
...
...
@@ -395,9 +393,7 @@ xfs_dir2_replace(
int
v
;
/* type-checking value */
ASSERT
((
dp
->
i_d
.
di_mode
&
IFMT
)
==
IFDIR
);
if
(
namelen
>=
MAXNAMELEN
)
{
return
XFS_ERROR
(
EINVAL
);
}
if
((
rval
=
xfs_dir_ino_validate
(
tp
->
t_mountp
,
inum
)))
{
return
rval
;
}
...
...
fs/xfs/xfs_rename.c
View file @
9ba118f5
...
...
@@ -269,11 +269,7 @@ xfs_rename(
return
XFS_ERROR
(
EXDEV
);
}
src_namelen
=
VNAMELEN
(
src_dentry
);
if
(
src_namelen
>=
MAXNAMELEN
)
return
XFS_ERROR
(
ENAMETOOLONG
);
target_namelen
=
VNAMELEN
(
target_dentry
);
if
(
target_namelen
>=
MAXNAMELEN
)
return
XFS_ERROR
(
ENAMETOOLONG
);
src_dp
=
XFS_BHVTOI
(
src_dir_bdp
);
target_dp
=
XFS_BHVTOI
(
target_dir_bdp
);
if
(
DM_EVENT_ENABLED
(
src_dir_vp
->
v_vfsp
,
src_dp
,
DM_EVENT_RENAME
)
||
...
...
fs/xfs/xfs_vnodeops.c
View file @
9ba118f5
...
...
@@ -1935,8 +1935,6 @@ xfs_create(
dm_di_mode
=
vap
->
va_mode
|
VTTOIF
(
vap
->
va_type
);
namelen
=
VNAMELEN
(
dentry
);
if
(
namelen
>=
MAXNAMELEN
)
return
XFS_ERROR
(
ENAMETOOLONG
);
if
(
DM_EVENT_ENABLED
(
dir_vp
->
v_vfsp
,
dp
,
DM_EVENT_CREATE
))
{
error
=
dm_send_namesp_event
(
DM_EVENT_CREATE
,
...
...
@@ -2433,8 +2431,7 @@ xfs_remove(
return
XFS_ERROR
(
EIO
);
namelen
=
VNAMELEN
(
dentry
);
if
(
namelen
>=
MAXNAMELEN
)
return
XFS_ERROR
(
ENAMETOOLONG
);
if
(
DM_EVENT_ENABLED
(
dir_vp
->
v_vfsp
,
dp
,
DM_EVENT_REMOVE
))
{
error
=
dm_send_namesp_event
(
DM_EVENT_REMOVE
,
dir_bdp
,
DM_RIGHT_NULL
,
NULL
,
DM_RIGHT_NULL
,
...
...
@@ -2668,8 +2665,6 @@ xfs_link(
vn_trace_entry
(
src_vp
,
__FUNCTION__
,
(
inst_t
*
)
__return_address
);
target_namelen
=
VNAMELEN
(
dentry
);
if
(
target_namelen
>=
MAXNAMELEN
)
return
XFS_ERROR
(
ENAMETOOLONG
);
if
(
src_vp
->
v_type
==
VDIR
)
return
XFS_ERROR
(
EPERM
);
...
...
@@ -2857,8 +2852,6 @@ xfs_mkdir(
return
XFS_ERROR
(
EIO
);
dir_namelen
=
VNAMELEN
(
dentry
);
if
(
dir_namelen
>=
MAXNAMELEN
)
return
XFS_ERROR
(
ENAMETOOLONG
);
tp
=
NULL
;
dp_joined_to_trans
=
B_FALSE
;
...
...
@@ -3100,8 +3093,6 @@ xfs_rmdir(
if
(
XFS_FORCED_SHUTDOWN
(
XFS_BHVTOI
(
dir_bdp
)
->
i_mount
))
return
XFS_ERROR
(
EIO
);
namelen
=
VNAMELEN
(
dentry
);
if
(
namelen
>=
MAXNAMELEN
)
return
XFS_ERROR
(
ENAMETOOLONG
);
if
(
DM_EVENT_ENABLED
(
dir_vp
->
v_vfsp
,
dp
,
DM_EVENT_REMOVE
))
{
error
=
dm_send_namesp_event
(
DM_EVENT_REMOVE
,
...
...
@@ -3415,8 +3406,7 @@ xfs_symlink(
return
XFS_ERROR
(
EIO
);
link_namelen
=
VNAMELEN
(
dentry
);
if
(
link_namelen
>=
MAXNAMELEN
)
return
XFS_ERROR
(
ENAMETOOLONG
);
/*
* Check component lengths of the target path name.
*/
...
...
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