Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105427
b: refs/heads/master
c: 510df2d
h: refs/heads/master
i:
  105425: f6c6cdb
  105423: 0e3e7b4
v: v3
  • Loading branch information
Ulrich Drepper authored and Linus Torvalds committed Jul 24, 2008
1 parent 9fc0327 commit 6b3e56c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be61a86d7237dd80510615f38ae21d6e1e98660c
refs/heads/master: 510df2dd482496083e1c3b1a8c9b6afd5fa4c7d7
4 changes: 2 additions & 2 deletions trunk/fs/inotify_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ asmlinkage long sys_inotify_init1(int flags)
struct file *filp;
int fd, ret;

if (flags & ~IN_CLOEXEC)
if (flags & ~(IN_CLOEXEC | IN_NONBLOCK))
return -EINVAL;

fd = get_unused_fd_flags(flags & O_CLOEXEC);
Expand Down Expand Up @@ -613,7 +613,7 @@ asmlinkage long sys_inotify_init1(int flags)
filp->f_path.dentry = dget(inotify_mnt->mnt_root);
filp->f_mapping = filp->f_path.dentry->d_inode->i_mapping;
filp->f_mode = FMODE_READ;
filp->f_flags = O_RDONLY;
filp->f_flags = O_RDONLY | (flags & O_NONBLOCK);
filp->private_data = dev;

INIT_LIST_HEAD(&dev->events);
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/inotify.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef _LINUX_INOTIFY_H
#define _LINUX_INOTIFY_H

/* For O_CLOEXEC */
/* For O_CLOEXEC and O_NONBLOCK */
#include <linux/fcntl.h>
#include <linux/types.h>

Expand Down Expand Up @@ -67,6 +67,7 @@ struct inotify_event {

/* Flags for sys_inotify_init1. */
#define IN_CLOEXEC O_CLOEXEC
#define IN_NONBLOCK O_NONBLOCK

#ifdef __KERNEL__

Expand Down

0 comments on commit 6b3e56c

Please sign in to comment.