From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Jan Kara <jack@suse.cz>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Al Viro <viro@zeniv.linux.org.uk>
Subject: linux-next: manual merge of the ext3 tree with Linus' tree
Date: Tue, 10 Jan 2012 12:22:15 +1100 [thread overview]
Message-ID: <20120110122215.a63256b9b640b8ef458e58f8@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]
Hi Jan,
Today's linux-next merge of the ext3 tree got a conflict in
fs/ext2/ioctl.c between commit 2a79f17e4a64 ("vfs: mnt_drop_write_file
()") from Linus' tree and commit 6e85201ff4f4 ("ext2: protect inode
changes in the SETVERSION and SETFLAGS ioctls") from the ext3 tree.
I fixed it up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc fs/ext2/ioctl.c
index 1089f76,b7f931f..0000000
--- a/fs/ext2/ioctl.c
+++ b/fs/ext2/ioctl.c
@@@ -80,28 -80,38 +80,38 @@@ long ext2_ioctl(struct file *filp, unsi
ext2_set_inode_flags(inode);
inode->i_ctime = CURRENT_TIME_SEC;
+ mutex_unlock(&inode->i_mutex);
+
mark_inode_dirty(inode);
setflags_out:
- mnt_drop_write(filp->f_path.mnt);
+ mnt_drop_write_file(filp);
return ret;
}
case EXT2_IOC_GETVERSION:
return put_user(inode->i_generation, (int __user *) arg);
- case EXT2_IOC_SETVERSION:
+ case EXT2_IOC_SETVERSION: {
+ __u32 generation;
+
if (!inode_owner_or_capable(inode))
return -EPERM;
- ret = mnt_want_write(filp->f_path.mnt);
+ ret = mnt_want_write_file(filp);
if (ret)
return ret;
- if (get_user(inode->i_generation, (int __user *) arg)) {
+ if (get_user(generation, (int __user *) arg)) {
ret = -EFAULT;
- } else {
- inode->i_ctime = CURRENT_TIME_SEC;
- mark_inode_dirty(inode);
+ goto setversion_out;
}
+
+ mutex_lock(&inode->i_mutex);
+ inode->i_ctime = CURRENT_TIME_SEC;
+ inode->i_generation = generation;
+ mutex_unlock(&inode->i_mutex);
+
+ mark_inode_dirty(inode);
+ setversion_out:
- mnt_drop_write(filp->f_path.mnt);
+ mnt_drop_write_file(filp);
return ret;
+ }
case EXT2_IOC_GETRSVSZ:
if (test_opt(inode->i_sb, RESERVATION)
&& S_ISREG(inode->i_mode)
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next reply other threads:[~2012-01-10 1:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-10 1:22 Stephen Rothwell [this message]
2012-01-10 12:01 ` linux-next: manual merge of the ext3 tree with Linus' tree Jan Kara
-- strict thread matches above, loose matches on Subject: below --
2021-06-18 0:32 Stephen Rothwell
2011-11-02 0:59 Stephen Rothwell
2010-05-22 5:45 Stephen Rothwell
2010-05-25 21:55 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120110122215.a63256b9b640b8ef458e58f8@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).