aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/hwmon/asus_atk0110.c1
-rw-r--r--drivers/hwmon/it87.c2
-rw-r--r--drivers/hwmon/max1111.c11
-rw-r--r--drivers/media/radio/si4713-i2c.c4
-rw-r--r--fs/ceph/mds_client.c19
-rw-r--r--fs/cifs/dir.c13
-rw-r--r--fs/cramfs/inode.c22
-rw-r--r--fs/exofs/super.c2
-rw-r--r--fs/hppfs/hppfs.c31
-rw-r--r--fs/ufs/namei.c12
-rw-r--r--sound/soc/codecs/wm8994.c9
-rw-r--r--sound/soc/sh/fsi-ak4642.c16
-rw-r--r--sound/soc/sh/fsi-da7210.c2
-rw-r--r--sound/soc/sh/fsi-hdmi.c4
14 files changed, 85 insertions, 63 deletions
diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c
index dcb78a7a8047..00e98517f94c 100644
--- a/drivers/hwmon/asus_atk0110.c
+++ b/drivers/hwmon/asus_atk0110.c
@@ -674,6 +674,7 @@ static int atk_debugfs_gitm_get(void *p, u64 *val)
674 else 674 else
675 err = -EIO; 675 err = -EIO;
676 676
677 ACPI_FREE(ret);
677 return err; 678 return err;
678} 679}
679 680
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index bb6405b92007..5f5247750430 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -1538,7 +1538,7 @@ static struct attribute *it87_attributes_label[] = {
1538}; 1538};
1539 1539
1540static const struct attribute_group it87_group_label = { 1540static const struct attribute_group it87_group_label = {
1541 .attrs = it87_attributes_vid, 1541 .attrs = it87_attributes_label,
1542}; 1542};
1543 1543
1544/* SuperIO detection - will change isa_address if a chip is found */ 1544/* SuperIO detection - will change isa_address if a chip is found */
diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c
index 12a54aa29776..14335bbc9bdc 100644
--- a/drivers/hwmon/max1111.c
+++ b/drivers/hwmon/max1111.c
@@ -40,6 +40,8 @@ struct max1111_data {
40 struct spi_transfer xfer[2]; 40 struct spi_transfer xfer[2];
41 uint8_t *tx_buf; 41 uint8_t *tx_buf;
42 uint8_t *rx_buf; 42 uint8_t *rx_buf;
43 struct mutex drvdata_lock;
44 /* protect msg, xfer and buffers from multiple access */
43}; 45};
44 46
45static int max1111_read(struct device *dev, int channel) 47static int max1111_read(struct device *dev, int channel)
@@ -48,6 +50,9 @@ static int max1111_read(struct device *dev, int channel)
48 uint8_t v1, v2; 50 uint8_t v1, v2;
49 int err; 51 int err;
50 52
53 /* writing to drvdata struct is not thread safe, wait on mutex */
54 mutex_lock(&data->drvdata_lock);
55
51 data->tx_buf[0] = (channel << MAX1111_CTRL_SEL_SH) | 56 data->tx_buf[0] = (channel << MAX1111_CTRL_SEL_SH) |
52 MAX1111_CTRL_PD0 | MAX1111_CTRL_PD1 | 57 MAX1111_CTRL_PD0 | MAX1111_CTRL_PD1 |
53 MAX1111_CTRL_SGL | MAX1111_CTRL_UNI | MAX1111_CTRL_STR; 58 MAX1111_CTRL_SGL | MAX1111_CTRL_UNI | MAX1111_CTRL_STR;
@@ -55,12 +60,15 @@ static int max1111_read(struct device *dev, int channel)
55 err = spi_sync(data->spi, &data->msg); 60 err = spi_sync(data->spi, &data->msg);
56 if (err < 0) { 61 if (err < 0) {
57 dev_err(dev, "spi_sync failed with %d\n", err); 62 dev_err(dev, "spi_sync failed with %d\n", err);
63 mutex_unlock(&data->drvdata_lock);
58 return err; 64 return err;
59 } 65 }
60 66
61 v1 = data->rx_buf[0]; 67 v1 = data->rx_buf[0];
62 v2 = data->rx_buf[1]; 68 v2 = data->rx_buf[1];
63 69
70 mutex_unlock(&data->drvdata_lock);
71
64 if ((v1 & 0xc0) || (v2 & 0x3f)) 72 if ((v1 & 0xc0) || (v2 & 0x3f))
65 return -EINVAL; 73 return -EINVAL;
66 74
@@ -176,6 +184,8 @@ static int __devinit max1111_probe(struct spi_device *spi)
176 if (err) 184 if (err)
177 goto err_free_data; 185 goto err_free_data;
178 186
187 mutex_init(&data->drvdata_lock);
188
179 data->spi = spi; 189 data->spi = spi;
180 spi_set_drvdata(spi, data); 190 spi_set_drvdata(spi, data);
181 191
@@ -213,6 +223,7 @@ static int __devexit max1111_remove(struct spi_device *spi)
213 223
214 hwmon_device_unregister(data->hwmon_dev); 224 hwmon_device_unregister(data->hwmon_dev);
215 sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group); 225 sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group);
226 mutex_destroy(&data->drvdata_lock);
216 kfree(data->rx_buf); 227 kfree(data->rx_buf);
217 kfree(data->tx_buf); 228 kfree(data->tx_buf);
218 kfree(data); 229 kfree(data);
diff --git a/drivers/media/radio/si4713-i2c.c b/drivers/media/radio/si4713-i2c.c
index deca2e06ff22..c9f4a8e65dc4 100644
--- a/drivers/media/radio/si4713-i2c.c
+++ b/drivers/media/radio/si4713-i2c.c
@@ -1033,7 +1033,7 @@ static int si4713_write_econtrol_string(struct si4713_device *sdev,
1033 char ps_name[MAX_RDS_PS_NAME + 1]; 1033 char ps_name[MAX_RDS_PS_NAME + 1];
1034 1034
1035 len = control->size - 1; 1035 len = control->size - 1;
1036 if (len > MAX_RDS_PS_NAME) { 1036 if (len < 0 || len > MAX_RDS_PS_NAME) {
1037 rval = -ERANGE; 1037 rval = -ERANGE;
1038 goto exit; 1038 goto exit;
1039 } 1039 }
@@ -1057,7 +1057,7 @@ static int si4713_write_econtrol_string(struct si4713_device *sdev,
1057 char radio_text[MAX_RDS_RADIO_TEXT + 1]; 1057 char radio_text[MAX_RDS_RADIO_TEXT + 1];
1058 1058
1059 len = control->size - 1; 1059 len = control->size - 1;
1060 if (len > MAX_RDS_RADIO_TEXT) { 1060 if (len < 0 || len > MAX_RDS_RADIO_TEXT) {
1061 rval = -ERANGE; 1061 rval = -ERANGE;
1062 goto exit; 1062 goto exit;
1063 } 1063 }
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 79743d146be6..0c1d91756528 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1438,12 +1438,15 @@ char *ceph_mdsc_build_path(struct dentry *dentry, int *plen, u64 *base,
1438 struct dentry *temp; 1438 struct dentry *temp;
1439 char *path; 1439 char *path;
1440 int len, pos; 1440 int len, pos;
1441 unsigned seq;
1441 1442
1442 if (dentry == NULL) 1443 if (dentry == NULL)
1443 return ERR_PTR(-EINVAL); 1444 return ERR_PTR(-EINVAL);
1444 1445
1445retry: 1446retry:
1446 len = 0; 1447 len = 0;
1448 seq = read_seqbegin(&rename_lock);
1449 rcu_read_lock();
1447 for (temp = dentry; !IS_ROOT(temp);) { 1450 for (temp = dentry; !IS_ROOT(temp);) {
1448 struct inode *inode = temp->d_inode; 1451 struct inode *inode = temp->d_inode;
1449 if (inode && ceph_snap(inode) == CEPH_SNAPDIR) 1452 if (inode && ceph_snap(inode) == CEPH_SNAPDIR)
@@ -1455,10 +1458,12 @@ retry:
1455 len += 1 + temp->d_name.len; 1458 len += 1 + temp->d_name.len;
1456 temp = temp->d_parent; 1459 temp = temp->d_parent;
1457 if (temp == NULL) { 1460 if (temp == NULL) {
1461 rcu_read_unlock();
1458 pr_err("build_path corrupt dentry %p\n", dentry); 1462 pr_err("build_path corrupt dentry %p\n", dentry);
1459 return ERR_PTR(-EINVAL); 1463 return ERR_PTR(-EINVAL);
1460 } 1464 }
1461 } 1465 }
1466 rcu_read_unlock();
1462 if (len) 1467 if (len)
1463 len--; /* no leading '/' */ 1468 len--; /* no leading '/' */
1464 1469
@@ -1467,9 +1472,12 @@ retry:
1467 return ERR_PTR(-ENOMEM); 1472 return ERR_PTR(-ENOMEM);
1468 pos = len; 1473 pos = len;
1469 path[pos] = 0; /* trailing null */ 1474 path[pos] = 0; /* trailing null */
1475 rcu_read_lock();
1470 for (temp = dentry; !IS_ROOT(temp) && pos != 0; ) { 1476 for (temp = dentry; !IS_ROOT(temp) && pos != 0; ) {
1471 struct inode *inode = temp->d_inode; 1477 struct inode *inode;
1472 1478
1479 spin_lock(&temp->d_lock);
1480 inode = temp->d_inode;
1473 if (inode && ceph_snap(inode) == CEPH_SNAPDIR) { 1481 if (inode && ceph_snap(inode) == CEPH_SNAPDIR) {
1474 dout("build_path path+%d: %p SNAPDIR\n", 1482 dout("build_path path+%d: %p SNAPDIR\n",
1475 pos, temp); 1483 pos, temp);
@@ -1478,21 +1486,26 @@ retry:
1478 break; 1486 break;
1479 } else { 1487 } else {
1480 pos -= temp->d_name.len; 1488 pos -= temp->d_name.len;
1481 if (pos < 0) 1489 if (pos < 0) {
1490 spin_unlock(&temp->d_lock);
1482 break; 1491 break;
1492 }
1483 strncpy(path + pos, temp->d_name.name, 1493 strncpy(path + pos, temp->d_name.name,
1484 temp->d_name.len); 1494 temp->d_name.len);
1485 } 1495 }
1496 spin_unlock(&temp->d_lock);
1486 if (pos) 1497 if (pos)
1487 path[--pos] = '/'; 1498 path[--pos] = '/';
1488 temp = temp->d_parent; 1499 temp = temp->d_parent;
1489 if (temp == NULL) { 1500 if (temp == NULL) {
1501 rcu_read_unlock();
1490 pr_err("build_path corrupt dentry\n"); 1502 pr_err("build_path corrupt dentry\n");
1491 kfree(path); 1503 kfree(path);
1492 return ERR_PTR(-EINVAL); 1504 return ERR_PTR(-EINVAL);
1493 } 1505 }
1494 } 1506 }
1495 if (pos != 0) { 1507 rcu_read_unlock();
1508 if (pos != 0 || read_seqretry(&rename_lock, seq)) {
1496 pr_err("build_path did not end path lookup where " 1509 pr_err("build_path did not end path lookup where "
1497 "expected, namelen is %d, pos is %d\n", len, pos); 1510 "expected, namelen is %d, pos is %d\n", len, pos);
1498 /* presumably this is only possible if racing with a 1511 /* presumably this is only possible if racing with a
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 81914df47ef1..fa8c21d913bc 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -55,6 +55,7 @@ build_path_from_dentry(struct dentry *direntry)
55 char dirsep; 55 char dirsep;
56 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb); 56 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb);
57 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb); 57 struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
58 unsigned seq;
58 59
59 if (direntry == NULL) 60 if (direntry == NULL)
60 return NULL; /* not much we can do if dentry is freed and 61 return NULL; /* not much we can do if dentry is freed and
@@ -68,22 +69,29 @@ build_path_from_dentry(struct dentry *direntry)
68 dfsplen = 0; 69 dfsplen = 0;
69cifs_bp_rename_retry: 70cifs_bp_rename_retry:
70 namelen = dfsplen; 71 namelen = dfsplen;
72 seq = read_seqbegin(&rename_lock);
73 rcu_read_lock();
71 for (temp = direntry; !IS_ROOT(temp);) { 74 for (temp = direntry; !IS_ROOT(temp);) {
72 namelen += (1 + temp->d_name.len); 75 namelen += (1 + temp->d_name.len);
73 temp = temp->d_parent; 76 temp = temp->d_parent;
74 if (temp == NULL) { 77 if (temp == NULL) {
75 cERROR(1, "corrupt dentry"); 78 cERROR(1, "corrupt dentry");
79 rcu_read_unlock();
76 return NULL; 80 return NULL;
77 } 81 }
78 } 82 }
83 rcu_read_unlock();
79 84
80 full_path = kmalloc(namelen+1, GFP_KERNEL); 85 full_path = kmalloc(namelen+1, GFP_KERNEL);
81 if (full_path == NULL) 86 if (full_path == NULL)
82 return full_path; 87 return full_path;
83 full_path[namelen] = 0; /* trailing null */ 88 full_path[namelen] = 0; /* trailing null */
89 rcu_read_lock();
84 for (temp = direntry; !IS_ROOT(temp);) { 90 for (temp = direntry; !IS_ROOT(temp);) {
91 spin_lock(&temp->d_lock);
85 namelen -= 1 + temp->d_name.len; 92 namelen -= 1 + temp->d_name.len;
86 if (namelen < 0) { 93 if (namelen < 0) {
94 spin_unlock(&temp->d_lock);
87 break; 95 break;
88 } else { 96 } else {
89 full_path[namelen] = dirsep; 97 full_path[namelen] = dirsep;
@@ -91,14 +99,17 @@ cifs_bp_rename_retry:
91 temp->d_name.len); 99 temp->d_name.len);
92 cFYI(0, "name: %s", full_path + namelen); 100 cFYI(0, "name: %s", full_path + namelen);
93 } 101 }
102 spin_unlock(&temp->d_lock);
94 temp = temp->d_parent; 103 temp = temp->d_parent;
95 if (temp == NULL) { 104 if (temp == NULL) {
96 cERROR(1, "corrupt dentry"); 105 cERROR(1, "corrupt dentry");
106 rcu_read_unlock();
97 kfree(full_path); 107 kfree(full_path);
98 return NULL; 108 return NULL;
99 } 109 }
100 } 110 }
101 if (namelen != dfsplen) { 111 rcu_read_unlock();
112 if (namelen != dfsplen || read_seqretry(&rename_lock, seq)) {
102 cERROR(1, "did not end path lookup where expected namelen is %d", 113 cERROR(1, "did not end path lookup where expected namelen is %d",
103 namelen); 114 namelen);
104 /* presumably this is only possible if racing with a rename 115 /* presumably this is only possible if racing with a rename
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index e141939080f0..739fb59bcdc2 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -37,7 +37,7 @@ static DEFINE_MUTEX(read_mutex);
37/* These macros may change in future, to provide better st_ino semantics. */ 37/* These macros may change in future, to provide better st_ino semantics. */
38#define OFFSET(x) ((x)->i_ino) 38#define OFFSET(x) ((x)->i_ino)
39 39
40static unsigned long cramino(struct cramfs_inode *cino, unsigned int offset) 40static unsigned long cramino(const struct cramfs_inode *cino, unsigned int offset)
41{ 41{
42 if (!cino->offset) 42 if (!cino->offset)
43 return offset + 1; 43 return offset + 1;
@@ -61,7 +61,7 @@ static unsigned long cramino(struct cramfs_inode *cino, unsigned int offset)
61} 61}
62 62
63static struct inode *get_cramfs_inode(struct super_block *sb, 63static struct inode *get_cramfs_inode(struct super_block *sb,
64 struct cramfs_inode *cramfs_inode, unsigned int offset) 64 const struct cramfs_inode *cramfs_inode, unsigned int offset)
65{ 65{
66 struct inode *inode; 66 struct inode *inode;
67 static struct timespec zerotime; 67 static struct timespec zerotime;
@@ -317,7 +317,7 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
317 /* Set it all up.. */ 317 /* Set it all up.. */
318 sb->s_op = &cramfs_ops; 318 sb->s_op = &cramfs_ops;
319 root = get_cramfs_inode(sb, &super.root, 0); 319 root = get_cramfs_inode(sb, &super.root, 0);
320 if (!root) 320 if (IS_ERR(root))
321 goto out; 321 goto out;
322 sb->s_root = d_alloc_root(root); 322 sb->s_root = d_alloc_root(root);
323 if (!sb->s_root) { 323 if (!sb->s_root) {
@@ -423,6 +423,7 @@ static int cramfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
423static struct dentry * cramfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) 423static struct dentry * cramfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
424{ 424{
425 unsigned int offset = 0; 425 unsigned int offset = 0;
426 struct inode *inode = NULL;
426 int sorted; 427 int sorted;
427 428
428 mutex_lock(&read_mutex); 429 mutex_lock(&read_mutex);
@@ -449,8 +450,8 @@ static struct dentry * cramfs_lookup(struct inode *dir, struct dentry *dentry, s
449 450
450 for (;;) { 451 for (;;) {
451 if (!namelen) { 452 if (!namelen) {
452 mutex_unlock(&read_mutex); 453 inode = ERR_PTR(-EIO);
453 return ERR_PTR(-EIO); 454 goto out;
454 } 455 }
455 if (name[namelen-1]) 456 if (name[namelen-1])
456 break; 457 break;
@@ -462,17 +463,18 @@ static struct dentry * cramfs_lookup(struct inode *dir, struct dentry *dentry, s
462 if (retval > 0) 463 if (retval > 0)
463 continue; 464 continue;
464 if (!retval) { 465 if (!retval) {
465 struct cramfs_inode entry = *de; 466 inode = get_cramfs_inode(dir->i_sb, de, dir_off);
466 mutex_unlock(&read_mutex); 467 break;
467 d_add(dentry, get_cramfs_inode(dir->i_sb, &entry, dir_off));
468 return NULL;
469 } 468 }
470 /* else (retval < 0) */ 469 /* else (retval < 0) */
471 if (sorted) 470 if (sorted)
472 break; 471 break;
473 } 472 }
473out:
474 mutex_unlock(&read_mutex); 474 mutex_unlock(&read_mutex);
475 d_add(dentry, NULL); 475 if (IS_ERR(inode))
476 return ERR_CAST(inode);
477 d_add(dentry, inode);
476 return NULL; 478 return NULL;
477} 479}
478 480
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index 06065bd37fc3..c57beddcc217 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -913,7 +913,7 @@ struct dentry *exofs_get_parent(struct dentry *child)
913 unsigned long ino = exofs_parent_ino(child); 913 unsigned long ino = exofs_parent_ino(child);
914 914
915 if (!ino) 915 if (!ino)
916 return NULL; 916 return ERR_PTR(-ESTALE);
917 917
918 return d_obtain_alias(exofs_iget(child->d_inode->i_sb, ino)); 918 return d_obtain_alias(exofs_iget(child->d_inode->i_sb, ino));
919} 919}
diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c
index 87ed48e0343d..85c098a499f3 100644
--- a/fs/hppfs/hppfs.c
+++ b/fs/hppfs/hppfs.c
@@ -139,7 +139,8 @@ static int file_removed(struct dentry *dentry, const char *file)
139static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry, 139static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry,
140 struct nameidata *nd) 140 struct nameidata *nd)
141{ 141{
142 struct dentry *proc_dentry, *new, *parent; 142 struct dentry *proc_dentry, *parent;
143 struct qstr *name = &dentry->d_name;
143 struct inode *inode; 144 struct inode *inode;
144 int err, deleted; 145 int err, deleted;
145 146
@@ -149,23 +150,9 @@ static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry,
149 else if (deleted) 150 else if (deleted)
150 return ERR_PTR(-ENOENT); 151 return ERR_PTR(-ENOENT);
151 152
152 err = -ENOMEM;
153 parent = HPPFS_I(ino)->proc_dentry; 153 parent = HPPFS_I(ino)->proc_dentry;
154 mutex_lock(&parent->d_inode->i_mutex); 154 mutex_lock(&parent->d_inode->i_mutex);
155 proc_dentry = d_lookup(parent, &dentry->d_name); 155 proc_dentry = lookup_one_len(name->name, parent, name->len);
156 if (proc_dentry == NULL) {
157 proc_dentry = d_alloc(parent, &dentry->d_name);
158 if (proc_dentry == NULL) {
159 mutex_unlock(&parent->d_inode->i_mutex);
160 goto out;
161 }
162 new = (*parent->d_inode->i_op->lookup)(parent->d_inode,
163 proc_dentry, NULL);
164 if (new) {
165 dput(proc_dentry);
166 proc_dentry = new;
167 }
168 }
169 mutex_unlock(&parent->d_inode->i_mutex); 156 mutex_unlock(&parent->d_inode->i_mutex);
170 157
171 if (IS_ERR(proc_dentry)) 158 if (IS_ERR(proc_dentry))
@@ -174,13 +161,11 @@ static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry,
174 err = -ENOMEM; 161 err = -ENOMEM;
175 inode = get_inode(ino->i_sb, proc_dentry); 162 inode = get_inode(ino->i_sb, proc_dentry);
176 if (!inode) 163 if (!inode)
177 goto out_dput; 164 goto out;
178 165
179 d_add(dentry, inode); 166 d_add(dentry, inode);
180 return NULL; 167 return NULL;
181 168
182 out_dput:
183 dput(proc_dentry);
184 out: 169 out:
185 return ERR_PTR(err); 170 return ERR_PTR(err);
186} 171}
@@ -690,8 +675,10 @@ static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)
690 struct inode *proc_ino = dentry->d_inode; 675 struct inode *proc_ino = dentry->d_inode;
691 struct inode *inode = new_inode(sb); 676 struct inode *inode = new_inode(sb);
692 677
693 if (!inode) 678 if (!inode) {
679 dput(dentry);
694 return ERR_PTR(-ENOMEM); 680 return ERR_PTR(-ENOMEM);
681 }
695 682
696 if (S_ISDIR(dentry->d_inode->i_mode)) { 683 if (S_ISDIR(dentry->d_inode->i_mode)) {
697 inode->i_op = &hppfs_dir_iops; 684 inode->i_op = &hppfs_dir_iops;
@@ -704,7 +691,7 @@ static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)
704 inode->i_fop = &hppfs_file_fops; 691 inode->i_fop = &hppfs_file_fops;
705 } 692 }
706 693
707 HPPFS_I(inode)->proc_dentry = dget(dentry); 694 HPPFS_I(inode)->proc_dentry = dentry;
708 695
709 inode->i_uid = proc_ino->i_uid; 696 inode->i_uid = proc_ino->i_uid;
710 inode->i_gid = proc_ino->i_gid; 697 inode->i_gid = proc_ino->i_gid;
@@ -737,7 +724,7 @@ static int hppfs_fill_super(struct super_block *sb, void *d, int silent)
737 sb->s_fs_info = proc_mnt; 724 sb->s_fs_info = proc_mnt;
738 725
739 err = -ENOMEM; 726 err = -ENOMEM;
740 root_inode = get_inode(sb, proc_mnt->mnt_sb->s_root); 727 root_inode = get_inode(sb, dget(proc_mnt->mnt_sb->s_root));
741 if (!root_inode) 728 if (!root_inode)
742 goto out_mntput; 729 goto out_mntput;
743 730
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c
index 29309e25417f..b57aab9a1184 100644
--- a/fs/ufs/namei.c
+++ b/fs/ufs/namei.c
@@ -56,16 +56,12 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, stru
56 56
57 lock_ufs(dir->i_sb); 57 lock_ufs(dir->i_sb);
58 ino = ufs_inode_by_name(dir, &dentry->d_name); 58 ino = ufs_inode_by_name(dir, &dentry->d_name);
59 if (ino) { 59 if (ino)
60 inode = ufs_iget(dir->i_sb, ino); 60 inode = ufs_iget(dir->i_sb, ino);
61 if (IS_ERR(inode)) {
62 unlock_ufs(dir->i_sb);
63 return ERR_CAST(inode);
64 }
65 }
66 unlock_ufs(dir->i_sb); 61 unlock_ufs(dir->i_sb);
67 d_add(dentry, inode); 62 if (IS_ERR(inode))
68 return NULL; 63 return ERR_CAST(inode);
64 return d_splice_alias(inode, dentry);
69} 65}
70 66
71/* 67/*
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index c2fc0356c2a4..83014a7c2e14 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -1190,7 +1190,6 @@ SND_SOC_DAPM_INPUT("DMIC1DAT"),
1190SND_SOC_DAPM_INPUT("DMIC2DAT"), 1190SND_SOC_DAPM_INPUT("DMIC2DAT"),
1191SND_SOC_DAPM_INPUT("Clock"), 1191SND_SOC_DAPM_INPUT("Clock"),
1192 1192
1193SND_SOC_DAPM_MICBIAS("MICBIAS", WM8994_MICBIAS, 2, 0),
1194SND_SOC_DAPM_SUPPLY_S("MICBIAS Supply", 1, SND_SOC_NOPM, 0, 0, micbias_ev, 1193SND_SOC_DAPM_SUPPLY_S("MICBIAS Supply", 1, SND_SOC_NOPM, 0, 0, micbias_ev,
1195 SND_SOC_DAPM_PRE_PMU), 1194 SND_SOC_DAPM_PRE_PMU),
1196 1195
@@ -1509,8 +1508,10 @@ static const struct snd_soc_dapm_route wm8994_revd_intercon[] = {
1509 { "AIF2DACDAT", NULL, "AIF1DACDAT" }, 1508 { "AIF2DACDAT", NULL, "AIF1DACDAT" },
1510 { "AIF1ADCDAT", NULL, "AIF2ADCDAT" }, 1509 { "AIF1ADCDAT", NULL, "AIF2ADCDAT" },
1511 { "AIF2ADCDAT", NULL, "AIF1ADCDAT" }, 1510 { "AIF2ADCDAT", NULL, "AIF1ADCDAT" },
1512 { "MICBIAS", NULL, "CLK_SYS" }, 1511 { "MICBIAS1", NULL, "CLK_SYS" },
1513 { "MICBIAS", NULL, "MICBIAS Supply" }, 1512 { "MICBIAS1", NULL, "MICBIAS Supply" },
1513 { "MICBIAS2", NULL, "CLK_SYS" },
1514 { "MICBIAS2", NULL, "MICBIAS Supply" },
1514}; 1515};
1515 1516
1516static const struct snd_soc_dapm_route wm8994_intercon[] = { 1517static const struct snd_soc_dapm_route wm8994_intercon[] = {
@@ -2763,7 +2764,7 @@ static void wm8958_default_micdet(u16 status, void *data)
2763 report = SND_JACK_MICROPHONE; 2764 report = SND_JACK_MICROPHONE;
2764 2765
2765 /* Everything else is buttons; just assign slots */ 2766 /* Everything else is buttons; just assign slots */
2766 if (status & 0x1c0) 2767 if (status & 0x1c)
2767 report |= SND_JACK_BTN_0; 2768 report |= SND_JACK_BTN_0;
2768 2769
2769done: 2770done:
diff --git a/sound/soc/sh/fsi-ak4642.c b/sound/soc/sh/fsi-ak4642.c
index d6f4703b3c07..770a71a15366 100644
--- a/sound/soc/sh/fsi-ak4642.c
+++ b/sound/soc/sh/fsi-ak4642.c
@@ -97,7 +97,7 @@ static int fsi_ak4642_remove(struct platform_device *pdev)
97 97
98static struct fsi_ak4642_data fsi_a_ak4642 = { 98static struct fsi_ak4642_data fsi_a_ak4642 = {
99 .name = "AK4642", 99 .name = "AK4642",
100 .card = "FSIA (AK4642)", 100 .card = "FSIA-AK4642",
101 .cpu_dai = "fsia-dai", 101 .cpu_dai = "fsia-dai",
102 .codec = "ak4642-codec.0-0012", 102 .codec = "ak4642-codec.0-0012",
103 .platform = "sh_fsi.0", 103 .platform = "sh_fsi.0",
@@ -106,7 +106,7 @@ static struct fsi_ak4642_data fsi_a_ak4642 = {
106 106
107static struct fsi_ak4642_data fsi_b_ak4642 = { 107static struct fsi_ak4642_data fsi_b_ak4642 = {
108 .name = "AK4642", 108 .name = "AK4642",
109 .card = "FSIB (AK4642)", 109 .card = "FSIB-AK4642",
110 .cpu_dai = "fsib-dai", 110 .cpu_dai = "fsib-dai",
111 .codec = "ak4642-codec.0-0012", 111 .codec = "ak4642-codec.0-0012",
112 .platform = "sh_fsi.0", 112 .platform = "sh_fsi.0",
@@ -115,7 +115,7 @@ static struct fsi_ak4642_data fsi_b_ak4642 = {
115 115
116static struct fsi_ak4642_data fsi_a_ak4643 = { 116static struct fsi_ak4642_data fsi_a_ak4643 = {
117 .name = "AK4643", 117 .name = "AK4643",
118 .card = "FSIA (AK4643)", 118 .card = "FSIA-AK4643",
119 .cpu_dai = "fsia-dai", 119 .cpu_dai = "fsia-dai",
120 .codec = "ak4642-codec.0-0013", 120 .codec = "ak4642-codec.0-0013",
121 .platform = "sh_fsi.0", 121 .platform = "sh_fsi.0",
@@ -124,7 +124,7 @@ static struct fsi_ak4642_data fsi_a_ak4643 = {
124 124
125static struct fsi_ak4642_data fsi_b_ak4643 = { 125static struct fsi_ak4642_data fsi_b_ak4643 = {
126 .name = "AK4643", 126 .name = "AK4643",
127 .card = "FSIB (AK4643)", 127 .card = "FSIB-AK4643",
128 .cpu_dai = "fsib-dai", 128 .cpu_dai = "fsib-dai",
129 .codec = "ak4642-codec.0-0013", 129 .codec = "ak4642-codec.0-0013",
130 .platform = "sh_fsi.0", 130 .platform = "sh_fsi.0",
@@ -133,7 +133,7 @@ static struct fsi_ak4642_data fsi_b_ak4643 = {
133 133
134static struct fsi_ak4642_data fsi2_a_ak4642 = { 134static struct fsi_ak4642_data fsi2_a_ak4642 = {
135 .name = "AK4642", 135 .name = "AK4642",
136 .card = "FSI2A (AK4642)", 136 .card = "FSI2A-AK4642",
137 .cpu_dai = "fsia-dai", 137 .cpu_dai = "fsia-dai",
138 .codec = "ak4642-codec.0-0012", 138 .codec = "ak4642-codec.0-0012",
139 .platform = "sh_fsi2", 139 .platform = "sh_fsi2",
@@ -142,7 +142,7 @@ static struct fsi_ak4642_data fsi2_a_ak4642 = {
142 142
143static struct fsi_ak4642_data fsi2_b_ak4642 = { 143static struct fsi_ak4642_data fsi2_b_ak4642 = {
144 .name = "AK4642", 144 .name = "AK4642",
145 .card = "FSI2B (AK4642)", 145 .card = "FSI2B-AK4642",
146 .cpu_dai = "fsib-dai", 146 .cpu_dai = "fsib-dai",
147 .codec = "ak4642-codec.0-0012", 147 .codec = "ak4642-codec.0-0012",
148 .platform = "sh_fsi2", 148 .platform = "sh_fsi2",
@@ -151,7 +151,7 @@ static struct fsi_ak4642_data fsi2_b_ak4642 = {
151 151
152static struct fsi_ak4642_data fsi2_a_ak4643 = { 152static struct fsi_ak4642_data fsi2_a_ak4643 = {
153 .name = "AK4643", 153 .name = "AK4643",
154 .card = "FSI2A (AK4643)", 154 .card = "FSI2A-AK4643",
155 .cpu_dai = "fsia-dai", 155 .cpu_dai = "fsia-dai",
156 .codec = "ak4642-codec.0-0013", 156 .codec = "ak4642-codec.0-0013",
157 .platform = "sh_fsi2", 157 .platform = "sh_fsi2",
@@ -160,7 +160,7 @@ static struct fsi_ak4642_data fsi2_a_ak4643 = {
160 160
161static struct fsi_ak4642_data fsi2_b_ak4643 = { 161static struct fsi_ak4642_data fsi2_b_ak4643 = {
162 .name = "AK4643", 162 .name = "AK4643",
163 .card = "FSI2B (AK4643)", 163 .card = "FSI2B-AK4643",
164 .cpu_dai = "fsib-dai", 164 .cpu_dai = "fsib-dai",
165 .codec = "ak4642-codec.0-0013", 165 .codec = "ak4642-codec.0-0013",
166 .platform = "sh_fsi2", 166 .platform = "sh_fsi2",
diff --git a/sound/soc/sh/fsi-da7210.c b/sound/soc/sh/fsi-da7210.c
index dbafd7ac5590..59553fd8c2fb 100644
--- a/sound/soc/sh/fsi-da7210.c
+++ b/sound/soc/sh/fsi-da7210.c
@@ -42,7 +42,7 @@ static struct snd_soc_dai_link fsi_da7210_dai = {
42}; 42};
43 43
44static struct snd_soc_card fsi_soc_card = { 44static struct snd_soc_card fsi_soc_card = {
45 .name = "FSI (DA7210)", 45 .name = "FSI-DA7210",
46 .dai_link = &fsi_da7210_dai, 46 .dai_link = &fsi_da7210_dai,
47 .num_links = 1, 47 .num_links = 1,
48}; 48};
diff --git a/sound/soc/sh/fsi-hdmi.c b/sound/soc/sh/fsi-hdmi.c
index 9719985eb82d..d3d9fd880680 100644
--- a/sound/soc/sh/fsi-hdmi.c
+++ b/sound/soc/sh/fsi-hdmi.c
@@ -83,13 +83,13 @@ static int fsi_hdmi_remove(struct platform_device *pdev)
83 83
84static struct fsi_hdmi_data fsi2_a_hdmi = { 84static struct fsi_hdmi_data fsi2_a_hdmi = {
85 .cpu_dai = "fsia-dai", 85 .cpu_dai = "fsia-dai",
86 .card = "FSI2A (SH MOBILE HDMI)", 86 .card = "FSI2A-HDMI",
87 .id = FSI_PORT_A, 87 .id = FSI_PORT_A,
88}; 88};
89 89
90static struct fsi_hdmi_data fsi2_b_hdmi = { 90static struct fsi_hdmi_data fsi2_b_hdmi = {
91 .cpu_dai = "fsib-dai", 91 .cpu_dai = "fsib-dai",
92 .card = "FSI2B (SH MOBILE HDMI)", 92 .card = "FSI2B-HDMI",
93 .id = FSI_PORT_B, 93 .id = FSI_PORT_B,
94}; 94};
95 95