Re: More kernel errors with overlay filesystem v22

From: Miklos Szeredi
Date: Thu May 29 2014 - 12:36:44 EST


On Thu, May 29, 2014 at 05:23:22PM +0100, David Howells wrote:
> Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> > Fixes pushed to overlayfs.v22 (and overlayfs.current). Will
> > eventually fold these into the main overlayfs patch.
>
> Okay... those are fixed. Here's the next:
>

generic_file_splice_write() uses I_MUTEX_CHILD. Not sure why, though, parent
shouldn't be locked. Maybe it's some remaining thing from the days when pipes
used the i_mutex on the pipe inode. Probably should just remove that notation
and things will work.

Untested.

Thanks,
Miklos

diff --git a/fs/splice.c b/fs/splice.c
index fb1094bbe5af..3703c512c46e 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1019,7 +1019,7 @@ generic_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
if (ret <= 0)
break;

- mutex_lock_nested(&inode->i_mutex, I_MUTEX_CHILD);
+ mutex_lock(&inode->i_mutex);
ret = file_remove_suid(out);
if (!ret) {
ret = file_update_time(out);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/