lkml.org 
[lkml]   [2005]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 3/4] files: change fd_install assertion


Change the fds[fd] != NULL check in fd_install() to be a BUG_ON.

Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
---


fs/open.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN fs/open.c~change-fd-install-assert fs/open.c
--- linux-2.6.12-mm1-fix/fs/open.c~change-fd-install-assert 2005-06-25 16:43:02.000000000 +0530
+++ linux-2.6.12-mm1-fix-dipankar/fs/open.c 2005-06-25 16:43:02.000000000 +0530
@@ -931,8 +931,7 @@ void fastcall fd_install(unsigned int fd
struct fdtable *fdt;
spin_lock(&files->file_lock);
fdt = files_fdtable(files);
- if (unlikely(fdt->fd[fd] != NULL))
- BUG();
+ BUG_ON(fdt->fd[fd] != NULL);
rcu_assign_pointer(fdt->fd[fd], file);
spin_unlock(&files->file_lock);
}
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-24 13:11    [W:1.046 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site