Skip to content

Commit

Permalink
Merge branch 'akpm' (Fixes from Andrew)
Browse files Browse the repository at this point in the history
Merge misc fixes from Andrew Morton:
 "Five fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (5 patches)
  h8300: add missing L1_CACHE_SHIFT
  mm: bugfix: set current->reclaim_state to NULL while returning from kswapd()
  fanotify: fix missing break
  revert "epoll: support for disabling items, and a self-test app"
  checkpatch: improve network block comment style checking
  • Loading branch information
Linus Torvalds committed Nov 9, 2012
2 parents c0cba03 + 6893f56 commit ce6d841
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 395 deletions.
3 changes: 2 additions & 1 deletion arch/h8300/include/asm/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#define __ARCH_H8300_CACHE_H

/* bytes per L1 cache line */
#define L1_CACHE_BYTES 4
#define L1_CACHE_SHIFT 2
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)

/* m68k-elf-gcc 2.95.2 doesn't like these */

Expand Down
38 changes: 3 additions & 35 deletions fs/eventpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ static inline struct epitem *ep_item_from_epqueue(poll_table *p)
/* Tells if the epoll_ctl(2) operation needs an event copy from userspace */
static inline int ep_op_has_event(int op)
{
return op == EPOLL_CTL_ADD || op == EPOLL_CTL_MOD;
return op != EPOLL_CTL_DEL;
}

/* Initialize the poll safe wake up structure */
Expand Down Expand Up @@ -676,34 +676,6 @@ static int ep_remove(struct eventpoll *ep, struct epitem *epi)
return 0;
}

/*
* Disables a "struct epitem" in the eventpoll set. Returns -EBUSY if the item
* had no event flags set, indicating that another thread may be currently
* handling that item's events (in the case that EPOLLONESHOT was being
* used). Otherwise a zero result indicates that the item has been disabled
* from receiving events. A disabled item may be re-enabled via
* EPOLL_CTL_MOD. Must be called with "mtx" held.
*/
static int ep_disable(struct eventpoll *ep, struct epitem *epi)
{
int result = 0;
unsigned long flags;

spin_lock_irqsave(&ep->lock, flags);
if (epi->event.events & ~EP_PRIVATE_BITS) {
if (ep_is_linked(&epi->rdllink))
list_del_init(&epi->rdllink);
/* Ensure ep_poll_callback will not add epi back onto ready
list: */
epi->event.events &= EP_PRIVATE_BITS;
}
else
result = -EBUSY;
spin_unlock_irqrestore(&ep->lock, flags);

return result;
}

static void ep_free(struct eventpoll *ep)
{
struct rb_node *rbp;
Expand Down Expand Up @@ -1048,6 +1020,8 @@ static void ep_rbtree_insert(struct eventpoll *ep, struct epitem *epi)
rb_insert_color(&epi->rbn, &ep->rbr);
}



#define PATH_ARR_SIZE 5
/*
* These are the number paths of length 1 to 5, that we are allowing to emanate
Expand Down Expand Up @@ -1813,12 +1787,6 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd,
} else
error = -ENOENT;
break;
case EPOLL_CTL_DISABLE:
if (epi)
error = ep_disable(ep, epi);
else
error = -ENOENT;
break;
}
mutex_unlock(&ep->mtx);

Expand Down
1 change: 1 addition & 0 deletions fs/notify/fanotify/fanotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ static bool should_merge(struct fsnotify_event *old, struct fsnotify_event *new)
if ((old->path.mnt == new->path.mnt) &&
(old->path.dentry == new->path.dentry))
return true;
break;
case (FSNOTIFY_EVENT_NONE):
return true;
default:
Expand Down
1 change: 0 additions & 1 deletion include/uapi/linux/eventpoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#define EPOLL_CTL_ADD 1
#define EPOLL_CTL_DEL 2
#define EPOLL_CTL_MOD 3
#define EPOLL_CTL_DISABLE 4

/*
* Request the handling of system wakeup events so as to prevent system suspends
Expand Down
2 changes: 2 additions & 0 deletions mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -3017,6 +3017,8 @@ static int kswapd(void *p)
&balanced_classzone_idx);
}
}

current->reclaim_state = NULL;
return 0;
}

Expand Down
6 changes: 4 additions & 2 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1890,8 +1890,10 @@ sub process {
}

if ($realfile =~ m@^(drivers/net/|net/)@ &&
$rawline !~ m@^\+[ \t]*(\/\*|\*\/)@ &&
$rawline =~ m@^\+[ \t]*.+\*\/[ \t]*$@) {
$rawline !~ m@^\+[ \t]*\*/[ \t]*$@ && #trailing */
$rawline !~ m@^\+.*/\*.*\*/[ \t]*$@ && #inline /*...*/
$rawline !~ m@^\+.*\*{2,}/[ \t]*$@ && #trailing **/
$rawline =~ m@^\+[ \t]*.+\*\/[ \t]*$@) { #non blank */
WARN("NETWORKING_BLOCK_COMMENT_STYLE",
"networking block comments put the trailing */ on a separate line\n" . $herecurr);
}
Expand Down
2 changes: 1 addition & 1 deletion tools/testing/selftests/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TARGETS = breakpoints kcmp mqueue vm cpu-hotplug memory-hotplug epoll
TARGETS = breakpoints kcmp mqueue vm cpu-hotplug memory-hotplug

all:
for TARGET in $(TARGETS); do \
Expand Down
11 changes: 0 additions & 11 deletions tools/testing/selftests/epoll/Makefile

This file was deleted.

Loading

0 comments on commit ce6d841

Please sign in to comment.