1 diff --git a/Makefile b/Makefile
2 index b5f32ce..3b1515e 100644
9 -EXTRAVERSION = .21-op1
10 +EXTRAVERSION = .22-op1-rc1
11 NAME = Holy Dancing Manatees, Batman!
14 diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
15 index 8617298..e8fcce7 100644
16 --- a/drivers/net/tulip/de2104x.c
17 +++ b/drivers/net/tulip/de2104x.c
18 @@ -843,7 +843,7 @@ static inline int de_is_running (struct de_private *de)
19 static void de_stop_rxtx (struct de_private *de)
22 - unsigned int work = 1000;
23 + unsigned int i = 1300/100;
25 macmode = dr32(MacMode);
27 @@ -851,10 +851,14 @@ static void de_stop_rxtx (struct de_private *de)
31 - while (--work > 0) {
32 + /* wait until in-flight frame completes.
33 + * Max time @ 10BT: 1500*8b/10Mbps == 1200us (+ 100us margin)
34 + * Typically expect this loop to end in < 50 us on 100BT.
37 if (!de_is_running(de))
43 printk(KERN_WARNING "%s: timeout expired stopping DMA\n", de->dev->name);
44 diff --git a/fs/aio.c b/fs/aio.c
45 index dbe699e..b3419c5 100644
48 @@ -303,7 +303,7 @@ static void wait_for_all_aios(struct kioctx *ctx)
49 set_task_state(tsk, TASK_UNINTERRUPTIBLE);
50 while (ctx->reqs_active) {
51 spin_unlock_irq(&ctx->ctx_lock);
54 set_task_state(tsk, TASK_UNINTERRUPTIBLE);
55 spin_lock_irq(&ctx->ctx_lock);
57 @@ -323,7 +323,7 @@ ssize_t fastcall wait_on_sync_kiocb(struct kiocb *iocb)
58 set_current_state(TASK_UNINTERRUPTIBLE);
64 __set_current_state(TASK_RUNNING);
65 return iocb->ki_user_data;
66 @@ -946,14 +946,6 @@ int fastcall aio_complete(struct kiocb *iocb, long res, long res2)
71 - * Check if the user asked us to deliver the result through an
72 - * eventfd. The eventfd_signal() function is safe to be called
75 - if (!IS_ERR(iocb->ki_eventfd))
76 - eventfd_signal(iocb->ki_eventfd, 1);
78 info = &ctx->ring_info;
80 /* add a completion event to the ring buffer.
81 @@ -1002,6 +994,15 @@ int fastcall aio_complete(struct kiocb *iocb, long res, long res2)
82 kunmap_atomic(ring, KM_IRQ1);
84 pr_debug("added to ring %p at [%lu]\n", iocb, tail);
87 + * Check if the user asked us to deliver the result through an
88 + * eventfd. The eventfd_signal() function is safe to be called
91 + if (!IS_ERR(iocb->ki_eventfd))
92 + eventfd_signal(iocb->ki_eventfd, 1);
95 /* everything turned out well, dispose of the aiocb. */
96 ret = __aio_put_req(ctx, iocb);
97 @@ -1170,7 +1171,7 @@ retry:
99 if (to.timed_out) /* Only check after read evt */
103 if (signal_pending(tsk)) {
106 diff --git a/fs/dcache.c b/fs/dcache.c
107 index 0e73aa0..c54dc50 100644
110 @@ -1407,9 +1407,6 @@ void d_delete(struct dentry * dentry)
111 if (atomic_read(&dentry->d_count) == 1) {
113 fsnotify_nameremove(dentry, isdir);
115 - /* remove this and other inotify debug checks after 2.6.18 */
116 - dentry->d_flags &= ~DCACHE_INOTIFY_PARENT_WATCHED;
120 diff --git a/fs/inotify.c b/fs/inotify.c
121 index 7457501..8ee2b43 100644
124 @@ -168,20 +168,14 @@ static void set_dentry_child_flags(struct inode *inode, int watched)
125 struct dentry *child;
127 list_for_each_entry(child, &alias->d_subdirs, d_u.d_child) {
128 - if (!child->d_inode) {
129 - WARN_ON(child->d_flags & DCACHE_INOTIFY_PARENT_WATCHED);
130 + if (!child->d_inode)
134 spin_lock(&child->d_lock);
136 - WARN_ON(child->d_flags &
137 - DCACHE_INOTIFY_PARENT_WATCHED);
139 child->d_flags |= DCACHE_INOTIFY_PARENT_WATCHED;
141 - WARN_ON(!(child->d_flags &
142 - DCACHE_INOTIFY_PARENT_WATCHED));
143 - child->d_flags&=~DCACHE_INOTIFY_PARENT_WATCHED;
146 + child->d_flags &=~DCACHE_INOTIFY_PARENT_WATCHED;
147 spin_unlock(&child->d_lock);
150 @@ -253,7 +247,6 @@ void inotify_d_instantiate(struct dentry *entry, struct inode *inode)
154 - WARN_ON(entry->d_flags & DCACHE_INOTIFY_PARENT_WATCHED);
155 spin_lock(&entry->d_lock);
156 parent = entry->d_parent;
157 if (parent->d_inode && inotify_inode_watched(parent->d_inode))
158 @@ -627,6 +620,7 @@ s32 inotify_add_watch(struct inotify_handle *ih, struct inotify_watch *watch,
159 struct inode *inode, u32 mask)
164 /* don't allow invalid bits: we don't want flags set */
165 mask &= IN_ALL_EVENTS | IN_ONESHOT;
166 @@ -653,12 +647,18 @@ s32 inotify_add_watch(struct inotify_handle *ih, struct inotify_watch *watch,
168 watch->inode = igrab(inode);
170 - if (!inotify_inode_watched(inode))
171 - set_dentry_child_flags(inode, 1);
173 /* Add the watch to the handle's and the inode's list */
174 + newly_watched = !inotify_inode_watched(inode);
175 list_add(&watch->h_list, &ih->watches);
176 list_add(&watch->i_list, &inode->inotify_watches);
178 + * Set child flags _after_ adding the watch, so there is no race
179 + * windows where newly instantiated children could miss their parent's
183 + set_dentry_child_flags(inode, 1);
186 mutex_unlock(&ih->mutex);
187 mutex_unlock(&inode->inotify_mutex);
188 diff --git a/fs/splice.c b/fs/splice.c
189 index dbbe267..3da87fe 100644
193 #include <linux/module.h>
194 #include <linux/syscalls.h>
195 #include <linux/uio.h>
196 +#include <linux/security.h>
198 struct partial_page {
200 @@ -331,7 +332,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
203 error = add_to_page_cache_lru(page, mapping, index,
205 + mapping_gfp_mask(mapping));
206 if (unlikely(error)) {
207 page_cache_release(page);
208 if (error == -EEXIST)
209 @@ -932,6 +933,10 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
210 if (unlikely(ret < 0))
213 + ret = security_file_permission(out, MAY_WRITE);
214 + if (unlikely(ret < 0))
217 return out->f_op->splice_write(pipe, out, ppos, len, flags);
220 @@ -954,6 +959,10 @@ static long do_splice_to(struct file *in, loff_t *ppos,
221 if (unlikely(ret < 0))
224 + ret = security_file_permission(in, MAY_READ);
225 + if (unlikely(ret < 0))
228 return in->f_op->splice_read(in, ppos, pipe, len, flags);
231 @@ -1489,6 +1498,13 @@ static int link_pipe(struct pipe_inode_info *ipipe,
236 + * return EAGAIN if we have the potential of some data in the
237 + * future, otherwise just return 0
239 + if (!ret && ipipe->waiting_writers && (flags & SPLICE_F_NONBLOCK))
242 inode_double_unlock(ipipe->inode, opipe->inode);
245 @@ -1529,11 +1545,8 @@ static long do_tee(struct file *in, struct file *out, size_t len,
246 ret = link_ipipe_prep(ipipe, flags);
248 ret = link_opipe_prep(opipe, flags);
251 ret = link_pipe(ipipe, opipe, len, flags);
252 - if (!ret && (flags & SPLICE_F_NONBLOCK))
258 diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
259 index eee57e6..de6e5df 100644
260 --- a/net/ipv4/tcp_output.c
261 +++ b/net/ipv4/tcp_output.c
262 @@ -246,7 +246,7 @@ static u16 tcp_select_window(struct sock *sk)
264 * Relax Will Robinson.
267 + new_win = ALIGN(cur_win, 1 << tp->rx_opt.rcv_wscale);
269 tp->rcv_wnd = new_win;
270 tp->rcv_wup = tp->rcv_nxt;