Commit d51b8f84 authored by David S. Miller's avatar David S. Miller

Merge bk://kernel.bkbits.net/acme/net-2.5

into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents ca8658e8 c87ec979
VERSION = 2
PATCHLEVEL = 5
SUBLEVEL = 71
SUBLEVEL = 72
EXTRAVERSION =
# *DOCUMENTATION*
......
......@@ -297,13 +297,14 @@ int dm_hash_rename(const char *old, const char *new)
/*
* rename and move the name cell.
*/
unregister_with_devfs(hc);
list_del(&hc->name_list);
old_name = hc->name;
hc->name = new_name;
list_add(&hc->name_list, _name_buckets + hash_str(new_name));
/* rename the device node in devfs */
unregister_with_devfs(hc);
register_with_devfs(hc);
up_write(&_hash_lock);
......
......@@ -952,8 +952,6 @@ static int bond_open(struct net_device *dev)
add_timer(alb_timer);
}
MOD_INC_USE_COUNT;
if (miimon > 0) { /* link check interval, in milliseconds. */
init_timer(timer);
timer->expires = jiffies + (miimon * HZ / 1000);
......@@ -1027,7 +1025,6 @@ static int bond_close(struct net_device *master)
bond_alb_deinitialize(bond);
}
MOD_DEC_USE_COUNT;
return 0;
}
......@@ -3694,6 +3691,8 @@ static int __init bond_init(struct net_device *dev)
kfree(bond);
return -ENOMEM;
}
bond->bond_proc_dir->owner = THIS_MODULE;
bond->bond_proc_info_file =
create_proc_info_entry("info", 0, bond->bond_proc_dir,
bond_get_info);
......@@ -3705,6 +3704,7 @@ static int __init bond_init(struct net_device *dev)
kfree(bond);
return -ENOMEM;
}
bond->bond_proc_info_file->owner = THIS_MODULE;
#endif /* CONFIG_PROC_FS */
if (first_pass == 1) {
......
......@@ -630,7 +630,7 @@ static void shaper_init_priv(struct net_device *dev)
* Add a shaper device to the system
*/
static int __init shaper_probe(struct net_device *dev)
static void __init shaper_setup(struct net_device *dev)
{
/*
* Set up the shaper.
......@@ -642,6 +642,7 @@ static int __init shaper_probe(struct net_device *dev)
dev->open = shaper_open;
dev->stop = shaper_close;
dev->destructor = (void (*)(struct net_device *))kfree;
dev->hard_start_xmit = shaper_start_xmit;
dev->get_stats = shaper_get_stats;
dev->set_multicast_list = NULL;
......@@ -669,12 +670,6 @@ static int __init shaper_probe(struct net_device *dev)
dev->addr_len = 0;
dev->tx_queue_len = 10;
dev->flags = 0;
/*
* Shaper is ok
*/
return 0;
}
static int shapers = 1;
......@@ -695,35 +690,38 @@ __setup("shapers=", set_num_shapers);
#endif /* MODULE */
static struct net_device *devs;
static struct net_device **devs;
static unsigned int shapers_registered = 0;
static int __init shaper_init(void)
{
int i, err;
int i;
size_t alloc_size;
struct shaper *sp;
struct net_device *dev;
char name[IFNAMSIZ];
if (shapers < 1)
return -ENODEV;
alloc_size = (sizeof(*devs) * shapers) +
(sizeof(struct shaper) * shapers);
alloc_size = sizeof(*dev) * shapers;
devs = kmalloc(alloc_size, GFP_KERNEL);
if (!devs)
return -ENOMEM;
memset(devs, 0, alloc_size);
sp = (struct shaper *) &devs[shapers];
for (i = 0; i < shapers; i++) {
err = dev_alloc_name(&devs[i], "shaper%d");
if (err < 0)
snprintf(name, IFNAMSIZ, "shaper%d", i);
dev = alloc_netdev(sizeof(struct shaper), name,
shaper_setup);
if (!dev)
break;
devs[i].init = shaper_probe;
devs[i].priv = &sp[i];
if (register_netdev(&devs[i]))
if (register_netdev(dev))
break;
devs[i] = dev;
shapers_registered++;
}
......@@ -740,7 +738,8 @@ static void __exit shaper_exit (void)
int i;
for (i = 0; i < shapers_registered; i++)
unregister_netdev(&devs[i]);
if (devs[i])
unregister_netdev(devs[i]);
kfree(devs);
devs = NULL;
......
......@@ -985,6 +985,8 @@ static inline int check_sticky(struct inode *dir, struct inode *inode)
* 7. If we were asked to remove a directory and victim isn't one - ENOTDIR.
* 8. If we were asked to remove a non-directory and victim isn't one - EISDIR.
* 9. We can't remove a root or mountpoint.
* 10. We don't allow removal of NFS sillyrenamed files; it's handled by
* nfs_async_unlink().
*/
static inline int may_delete(struct inode *dir,struct dentry *victim, int isdir)
{
......@@ -1008,6 +1010,8 @@ static inline int may_delete(struct inode *dir,struct dentry *victim, int isdir)
return -EISDIR;
if (IS_DEADDIR(dir))
return -ENOENT;
if (victim->d_flags & DCACHE_NFSFS_RENAMED)
return -EBUSY;
return 0;
}
......
......@@ -715,7 +715,6 @@ __nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
if (fattr->valid & NFS_ATTR_FATTR_V4)
nfsi->change_attr = fattr->change_attr;
inode->i_size = nfs_size_to_loff_t(fattr->size);
inode->i_mode = fattr->mode;
inode->i_nlink = fattr->nlink;
inode->i_uid = fattr->uid;
inode->i_gid = fattr->gid;
......
......@@ -387,8 +387,17 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc,
if (type == IGMPV3_ALLOW_NEW_SOURCES ||
type == IGMPV3_BLOCK_OLD_SOURCES)
return skb;
if (pmc->crcount || isquery)
if (pmc->crcount || isquery) {
/* make sure we have room for group header and at
* least one source.
*/
if (skb && AVAILABLE(skb) < sizeof(struct igmpv3_grec)+
sizeof(__u32)) {
igmpv3_sendpack(skb);
skb = 0; /* add_grhead will get a new one */
}
skb = add_grhead(skb, pmc, type, &pgr);
}
return skb;
}
pih = skb ? (struct igmpv3_report *)skb->h.igmph : 0;
......
......@@ -1321,8 +1321,17 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ifmcaddr6 *pmc,
if (type == MLD2_ALLOW_NEW_SOURCES ||
type == MLD2_BLOCK_OLD_SOURCES)
return skb;
if (pmc->mca_crcount || isquery)
if (pmc->mca_crcount || isquery) {
/* make sure we have room for group header and at
* least one source.
*/
if (skb && AVAILABLE(skb) < sizeof(struct mld2_grec)+
sizeof(struct in6_addr)) {
mld_sendpack(skb);
skb = 0; /* add_grhead will get a new one */
}
skb = add_grhead(skb, pmc, type, &pgr);
}
return skb;
}
pmr = skb ? (struct mld2_report *)skb->h.raw : 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment