This patch proposes an additional error checking performed within setfl(). As a result, fcntl (fd, F_SETFL, O_ASYNC) will return -1 and set errno to -EINVAL if filp->f_op->fasync is NULL for file specified by fd. This is possible, for example, if fd is a descriptor returned by inotify_init(). Dmitry