projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NFSv4: Ensure that we check lock exclusive/shared type against open modes
[linux-2.6-block.git]
/
fs
/
open.c
diff --git
a/fs/open.c
b/fs/open.c
index 77becc04114908fae2a45f655ed22996264723ad..5720854156dbd61e28598da83a529294401eb119 100644
(file)
--- a/
fs/open.c
+++ b/
fs/open.c
@@
-836,7
+836,7
@@
EXPORT_SYMBOL(dentry_open);
static void __put_unused_fd(struct files_struct *files, unsigned int fd)
{
struct fdtable *fdt = files_fdtable(files);
static void __put_unused_fd(struct files_struct *files, unsigned int fd)
{
struct fdtable *fdt = files_fdtable(files);
- __
FD_CLR(fd, fdt->open_fds
);
+ __
clear_open_fd(fd, fdt
);
if (fd < files->next_fd)
files->next_fd = fd;
}
if (fd < files->next_fd)
files->next_fd = fd;
}
@@
-1080,7
+1080,7
@@
SYSCALL_DEFINE1(close, unsigned int, fd)
if (!filp)
goto out_unlock;
rcu_assign_pointer(fdt->fd[fd], NULL);
if (!filp)
goto out_unlock;
rcu_assign_pointer(fdt->fd[fd], NULL);
-
FD_CLR(fd, fdt->close_on_exec
);
+
__clear_close_on_exec(fd, fdt
);
__put_unused_fd(files, fd);
spin_unlock(&files->file_lock);
retval = filp_close(filp, files);
__put_unused_fd(files, fd);
spin_unlock(&files->file_lock);
retval = filp_close(filp, files);