linux-next: manual merge of the vfs tree with Linus' tree

From: Stephen Rothwell
Date: Thu Nov 07 2013 - 20:02:20 EST


Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
drivers/usb/core/file.c between commit 469271f8c48f ("drivers: usb: core:
{file,hub,sysfs,usb}.c: Whitespace fixes") from Linus' tree and commit
e84f9e57b90c ("consolidate the reassignments of ->f_op in ->open()
instances") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc drivers/usb/core/file.c
index 3bdfbf88a0ae,fe0d8365411a..000000000000
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@@ -27,29 -27,21 +27,21 @@@
static const struct file_operations *usb_minors[MAX_USB_MINORS];
static DECLARE_RWSEM(minor_rwsem);

-static int usb_open(struct inode * inode, struct file * file)
+static int usb_open(struct inode *inode, struct file *file)
{
- int minor = iminor(inode);
- const struct file_operations *c;
int err = -ENODEV;
- const struct file_operations *old_fops, *new_fops = NULL;
+ const struct file_operations *new_fops;

down_read(&minor_rwsem);
- c = usb_minors[minor];
+ new_fops = fops_get(usb_minors[iminor(inode)]);

- if (!c || !(new_fops = fops_get(c)))
+ if (!new_fops)
goto done;

- old_fops = file->f_op;
- file->f_op = new_fops;
+ replace_fops(file, new_fops);
/* Curiouser and curiouser... NULL ->open() as "no device" ? */
if (file->f_op->open)
- err = file->f_op->open(inode,file);
+ err = file->f_op->open(inode, file);
- if (err) {
- fops_put(file->f_op);
- file->f_op = fops_get(old_fops);
- }
- fops_put(old_fops);
done:
up_read(&minor_rwsem);
return err;

Attachment: pgp00000.pgp
Description: PGP signature