Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299774
b: refs/heads/master
c: fcbf94b
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Apr 28, 2012
1 parent a588f10 commit 5ef7763
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c629eaf8392b676b4f83c3dc344e66402bfeec92
refs/heads/master: fcbf94b9dedd2ce08e798a99aafc94fec8668161
1 change: 0 additions & 1 deletion trunk/fs/autofs4/autofs_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ struct autofs_sb_info {
int sub_version;
int min_proto;
int max_proto;
int compat_daemon;
unsigned long exp_timeout;
unsigned int type;
int reghost_enabled;
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/autofs4/dev-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp,
sbi->pipefd = pipefd;
sbi->pipe = pipe;
sbi->catatonic = 0;
sbi->compat_daemon = is_compat_task();
}
out:
mutex_unlock(&sbi->wq_mutex);
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/autofs4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/parser.h>
#include <linux/bitops.h>
#include <linux/magic.h>
#include <linux/compat.h>
#include "autofs_i.h"
#include <linux/module.h>

Expand Down Expand Up @@ -225,7 +224,6 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
set_autofs_type_indirect(&sbi->type);
sbi->min_proto = 0;
sbi->max_proto = 0;
sbi->compat_daemon = is_compat_task();
mutex_init(&sbi->wq_mutex);
mutex_init(&sbi->pipe_mutex);
spin_lock_init(&sbi->fs_lock);
Expand Down
22 changes: 3 additions & 19 deletions trunk/fs/autofs4/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,7 @@ static int autofs4_write(struct autofs_sb_info *sbi,

return (bytes > 0);
}

/*
* The autofs_v5 packet was misdesigned.
*
* The packets are identical on x86-32 and x86-64, but have different
* alignment. Which means that 'sizeof()' will give different results.
* Fix it up for the case of running 32-bit user mode on a 64-bit kernel.
*/
static noinline size_t autofs_v5_packet_size(struct autofs_sb_info *sbi)
{
size_t pktsz = sizeof(struct autofs_v5_packet);
#if defined(CONFIG_X86_64) && defined(CONFIG_COMPAT)
if (sbi->compat_daemon > 0)
pktsz -= 4;
#endif
return pktsz;
}


static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
struct autofs_wait_queue *wq,
int type)
Expand Down Expand Up @@ -172,7 +155,8 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
{
struct autofs_v5_packet *packet = &pkt.v5_pkt.v5_packet;

pktsz = autofs_v5_packet_size(sbi);
pktsz = sizeof(*packet);

packet->wait_queue_token = wq->wait_queue_token;
packet->len = wq->name.len;
memcpy(packet->name, wq->name.name, wq->name.len);
Expand Down

0 comments on commit 5ef7763

Please sign in to comment.