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
4ea8fed5
Commit
4ea8fed5
authored
Oct 15, 2012
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv4: Get rid of unnecessary BUG_ON()s
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
deed85e7
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
12 deletions
+6
-12
fs/nfs/cache_lib.c
fs/nfs/cache_lib.c
+0
-1
fs/nfs/callback_proc.c
fs/nfs/callback_proc.c
+0
-1
fs/nfs/nfs4file.c
fs/nfs/nfs4file.c
+0
-1
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+6
-8
fs/nfs/nfs4state.c
fs/nfs/nfs4state.c
+0
-1
No files found.
fs/nfs/cache_lib.c
View file @
4ea8fed5
...
...
@@ -118,7 +118,6 @@ int nfs_cache_register_sb(struct super_block *sb, struct cache_detail *cd)
struct
dentry
*
dir
;
dir
=
rpc_d_lookup_sb
(
sb
,
"cache"
);
BUG_ON
(
dir
==
NULL
);
ret
=
sunrpc_cache_register_pipefs
(
dir
,
cd
->
name
,
0600
,
cd
);
dput
(
dir
);
return
ret
;
...
...
fs/nfs/callback_proc.c
View file @
4ea8fed5
...
...
@@ -216,7 +216,6 @@ static u32 initiate_bulk_draining(struct nfs_client *clp,
}
pnfs_get_layout_hdr
(
lo
);
spin_unlock
(
&
ino
->
i_lock
);
BUG_ON
(
!
list_empty
(
&
lo
->
plh_bulk_recall
));
list_add
(
&
lo
->
plh_bulk_recall
,
&
recall_list
);
}
}
...
...
fs/nfs/nfs4file.c
View file @
4ea8fed5
...
...
@@ -20,7 +20,6 @@ nfs4_file_open(struct inode *inode, struct file *filp)
struct
iattr
attr
;
int
err
;
BUG_ON
(
inode
!=
dentry
->
d_inode
);
/*
* If no cached dentry exists or if it's negative, NFSv4 handled the
* opens in ->lookup() or ->create().
...
...
fs/nfs/nfs4proc.c
View file @
4ea8fed5
...
...
@@ -206,7 +206,6 @@ static void nfs4_setup_readdir(u64 cookie, __be32 *verifier, struct dentry *dent
{
__be32
*
start
,
*
p
;
BUG_ON
(
readdir
->
count
<
80
);
if
(
cookie
>
2
)
{
readdir
->
cookie
=
cookie
;
memcpy
(
&
readdir
->
verifier
,
verifier
,
sizeof
(
readdir
->
verifier
));
...
...
@@ -415,7 +414,6 @@ static void renew_lease(const struct nfs_server *server, unsigned long timestamp
static
void
nfs4_free_slot
(
struct
nfs4_slot_table
*
tbl
,
u32
slotid
)
{
BUG_ON
(
slotid
>=
NFS4_MAX_SLOT_TABLE
);
/* clear used bit in bitmap */
__clear_bit
(
slotid
,
tbl
->
used_slots
);
...
...
@@ -2533,7 +2531,8 @@ static int nfs4_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,
rpc_authflavor_t
flav_array
[
NFS_MAX_SECFLAVORS
];
len
=
rpcauth_list_flavors
(
flav_array
,
ARRAY_SIZE
(
flav_array
));
BUG_ON
(
len
<
0
);
if
(
len
<
0
)
return
len
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
/* AUTH_UNIX is the default flavor if none was specified,
...
...
@@ -3362,9 +3361,6 @@ static int _nfs4_proc_mknod(struct inode *dir, struct dentry *dentry,
int
mode
=
sattr
->
ia_mode
;
int
status
=
-
ENOMEM
;
BUG_ON
(
!
(
sattr
->
ia_valid
&
ATTR_MODE
));
BUG_ON
(
!
S_ISFIFO
(
mode
)
&&
!
S_ISBLK
(
mode
)
&&
!
S_ISCHR
(
mode
)
&&
!
S_ISSOCK
(
mode
));
data
=
nfs4_alloc_createdata
(
dir
,
&
dentry
->
d_name
,
sattr
,
NF4SOCK
);
if
(
data
==
NULL
)
goto
out
;
...
...
@@ -3380,10 +3376,13 @@ static int _nfs4_proc_mknod(struct inode *dir, struct dentry *dentry,
data
->
arg
.
ftype
=
NF4CHR
;
data
->
arg
.
u
.
device
.
specdata1
=
MAJOR
(
rdev
);
data
->
arg
.
u
.
device
.
specdata2
=
MINOR
(
rdev
);
}
else
if
(
!
S_ISSOCK
(
mode
))
{
status
=
-
EINVAL
;
goto
out_free
;
}
status
=
nfs4_do_create
(
dir
,
dentry
,
data
);
out_free:
nfs4_free_createdata
(
data
);
out:
return
status
;
...
...
@@ -5357,7 +5356,6 @@ int nfs4_proc_bind_conn_to_session(struct nfs_client *clp, struct rpc_cred *cred
};
dprintk
(
"--> %s
\n
"
,
__func__
);
BUG_ON
(
clp
==
NULL
);
res
.
session
=
kzalloc
(
sizeof
(
struct
nfs4_session
),
GFP_NOFS
);
if
(
unlikely
(
res
.
session
==
NULL
))
{
...
...
fs/nfs/nfs4state.c
View file @
4ea8fed5
...
...
@@ -1086,7 +1086,6 @@ void nfs_free_seqid(struct nfs_seqid *seqid)
*/
static
void
nfs_increment_seqid
(
int
status
,
struct
nfs_seqid
*
seqid
)
{
BUG_ON
(
list_first_entry
(
&
seqid
->
sequence
->
list
,
struct
nfs_seqid
,
list
)
!=
seqid
);
switch
(
status
)
{
case
0
:
break
;
...
...
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