aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-08-01 13:26:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-08-01 13:26:23 -0400
commita0e881b7c189fa2bd76c024dbff91e79511c971d (patch)
tree0c801918565b08921d21aceee5b326f64d998f5f /drivers
parenteff0d13f3823f35d70228cd151d2a2c89288ff32 (diff)
parentdbc6e0222d79e78925fe20733844a796a4b72cf9 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull second vfs pile from Al Viro: "The stuff in there: fsfreeze deadlock fixes by Jan (essentially, the deadlock reproduced by xfstests 068), symlink and hardlink restriction patches, plus assorted cleanups and fixes. Note that another fsfreeze deadlock (emergency thaw one) is *not* dealt with - the series by Fernando conflicts a lot with Jan's, breaks userland ABI (FIFREEZE semantics gets changed) and trades the deadlock for massive vfsmount leak; this is going to be handled next cycle. There probably will be another pull request, but that stuff won't be in it." Fix up trivial conflicts due to unrelated changes next to each other in drivers/{staging/gdm72xx/usb_boot.c, usb/gadget/storage_common.c} * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (54 commits) delousing target_core_file a bit Documentation: Correct s_umount state for freeze_fs/unfreeze_fs fs: Remove old freezing mechanism ext2: Implement freezing btrfs: Convert to new freezing mechanism nilfs2: Convert to new freezing mechanism ntfs: Convert to new freezing mechanism fuse: Convert to new freezing mechanism gfs2: Convert to new freezing mechanism ocfs2: Convert to new freezing mechanism xfs: Convert to new freezing code ext4: Convert to new freezing mechanism fs: Protect write paths by sb_start_write - sb_end_write fs: Skip atime update on frozen filesystem fs: Add freezing handling to mnt_want_write() / mnt_drop_write() fs: Improve filesystem freezing handling switch the protection of percpu_counter list to spinlock nfsd: Push mnt_want_write() outside of i_mutex btrfs: Push mnt_want_write() outside of i_mutex fat: Push mnt_want_write() outside of i_mutex ...
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/devtmpfs.c9
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c2
-rw-r--r--drivers/staging/bcm/Misc.c31
-rw-r--r--drivers/staging/gdm72xx/sdio_boot.c7
-rw-r--r--drivers/staging/gdm72xx/usb_boot.c22
-rw-r--r--drivers/target/target_core_file.c32
-rw-r--r--drivers/usb/gadget/storage_common.c12
-rw-r--r--drivers/usb/gadget/u_uac1.c6
-rw-r--r--drivers/video/fb_defio.c2
9 files changed, 35 insertions, 88 deletions
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
index d91a3a0b2325..deb4a456cf83 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -156,9 +156,7 @@ static int dev_mkdir(const char *name, umode_t mode)
156 if (!err) 156 if (!err)
157 /* mark as kernel-created inode */ 157 /* mark as kernel-created inode */
158 dentry->d_inode->i_private = &thread; 158 dentry->d_inode->i_private = &thread;
159 dput(dentry); 159 done_path_create(&path, dentry);
160 mutex_unlock(&path.dentry->d_inode->i_mutex);
161 path_put(&path);
162 return err; 160 return err;
163} 161}
164 162
@@ -218,10 +216,7 @@ static int handle_create(const char *nodename, umode_t mode, struct device *dev)
218 /* mark as kernel-created inode */ 216 /* mark as kernel-created inode */
219 dentry->d_inode->i_private = &thread; 217 dentry->d_inode->i_private = &thread;
220 } 218 }
221 dput(dentry); 219 done_path_create(&path, dentry);
222
223 mutex_unlock(&path.dentry->d_inode->i_mutex);
224 path_put(&path);
225 return err; 220 return err;
226} 221}
227 222
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index 57bf1d7ee80f..9ab24528f9b9 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -1188,7 +1188,7 @@ exit:
1188 kfree(buf); 1188 kfree(buf);
1189 /* close file before return */ 1189 /* close file before return */
1190 if (fp) 1190 if (fp)
1191 filp_close(fp, current->files); 1191 filp_close(fp, NULL);
1192 /* restore previous address limit */ 1192 /* restore previous address limit */
1193 set_fs(old_fs); 1193 set_fs(old_fs);
1194 1194
diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c
index 9a60d4cd2184..f545716c666d 100644
--- a/drivers/staging/bcm/Misc.c
+++ b/drivers/staging/bcm/Misc.c
@@ -157,12 +157,7 @@ static int create_worker_threads(struct bcm_mini_adapter *psAdapter)
157 157
158static struct file *open_firmware_file(struct bcm_mini_adapter *Adapter, const char *path) 158static struct file *open_firmware_file(struct bcm_mini_adapter *Adapter, const char *path)
159{ 159{
160 struct file *flp = NULL; 160 struct file *flp = filp_open(path, O_RDONLY, S_IRWXU);
161 mm_segment_t oldfs;
162 oldfs = get_fs();
163 set_fs(get_ds());
164 flp = filp_open(path, O_RDONLY, S_IRWXU);
165 set_fs(oldfs);
166 if (IS_ERR(flp)) { 161 if (IS_ERR(flp)) {
167 pr_err(DRV_NAME "Unable To Open File %s, err %ld", path, PTR_ERR(flp)); 162 pr_err(DRV_NAME "Unable To Open File %s, err %ld", path, PTR_ERR(flp));
168 flp = NULL; 163 flp = NULL;
@@ -183,14 +178,12 @@ static int BcmFileDownload(struct bcm_mini_adapter *Adapter, const char *path, u
183{ 178{
184 int errorno = 0; 179 int errorno = 0;
185 struct file *flp = NULL; 180 struct file *flp = NULL;
186 mm_segment_t oldfs;
187 struct timeval tv = {0}; 181 struct timeval tv = {0};
188 182
189 flp = open_firmware_file(Adapter, path); 183 flp = open_firmware_file(Adapter, path);
190 if (!flp) { 184 if (!flp) {
191 errorno = -ENOENT;
192 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Unable to Open %s\n", path); 185 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Unable to Open %s\n", path);
193 goto exit_download; 186 return -ENOENT;
194 } 187 }
195 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Opened file is = %s and length =0x%lx to be downloaded at =0x%x", path, (unsigned long)flp->f_dentry->d_inode->i_size, loc); 188 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Opened file is = %s and length =0x%lx to be downloaded at =0x%x", path, (unsigned long)flp->f_dentry->d_inode->i_size, loc);
196 do_gettimeofday(&tv); 189 do_gettimeofday(&tv);
@@ -201,10 +194,7 @@ static int BcmFileDownload(struct bcm_mini_adapter *Adapter, const char *path, u
201 errorno = -EIO; 194 errorno = -EIO;
202 goto exit_download; 195 goto exit_download;
203 } 196 }
204 oldfs = get_fs();
205 set_fs(get_ds());
206 vfs_llseek(flp, 0, 0); 197 vfs_llseek(flp, 0, 0);
207 set_fs(oldfs);
208 if (Adapter->bcm_file_readback_from_chip(Adapter->pvInterfaceAdapter, flp, loc)) { 198 if (Adapter->bcm_file_readback_from_chip(Adapter->pvInterfaceAdapter, flp, loc)) {
209 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Failed to read back firmware!"); 199 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Failed to read back firmware!");
210 errorno = -EIO; 200 errorno = -EIO;
@@ -212,12 +202,7 @@ static int BcmFileDownload(struct bcm_mini_adapter *Adapter, const char *path, u
212 } 202 }
213 203
214exit_download: 204exit_download:
215 oldfs = get_fs(); 205 filp_close(flp, NULL);
216 set_fs(get_ds());
217 if (flp && !(IS_ERR(flp)))
218 filp_close(flp, current->files);
219 set_fs(oldfs);
220
221 return errorno; 206 return errorno;
222} 207}
223 208
@@ -1056,10 +1041,8 @@ OUT:
1056static int bcm_parse_target_params(struct bcm_mini_adapter *Adapter) 1041static int bcm_parse_target_params(struct bcm_mini_adapter *Adapter)
1057{ 1042{
1058 struct file *flp = NULL; 1043 struct file *flp = NULL;
1059 mm_segment_t oldfs = {0};
1060 char *buff; 1044 char *buff;
1061 int len = 0; 1045 int len = 0;
1062 loff_t pos = 0;
1063 1046
1064 buff = kmalloc(BUFFER_1K, GFP_KERNEL); 1047 buff = kmalloc(BUFFER_1K, GFP_KERNEL);
1065 if (!buff) 1048 if (!buff)
@@ -1079,20 +1062,16 @@ static int bcm_parse_target_params(struct bcm_mini_adapter *Adapter)
1079 Adapter->pstargetparams = NULL; 1062 Adapter->pstargetparams = NULL;
1080 return -ENOENT; 1063 return -ENOENT;
1081 } 1064 }
1082 oldfs = get_fs(); 1065 len = kernel_read(flp, 0, buff, BUFFER_1K);
1083 set_fs(get_ds()); 1066 filp_close(flp, NULL);
1084 len = vfs_read(flp, (void __user __force *)buff, BUFFER_1K, &pos);
1085 set_fs(oldfs);
1086 1067
1087 if (len != sizeof(STARGETPARAMS)) { 1068 if (len != sizeof(STARGETPARAMS)) {
1088 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Mismatch in Target Param Structure!\n"); 1069 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Mismatch in Target Param Structure!\n");
1089 kfree(buff); 1070 kfree(buff);
1090 kfree(Adapter->pstargetparams); 1071 kfree(Adapter->pstargetparams);
1091 Adapter->pstargetparams = NULL; 1072 Adapter->pstargetparams = NULL;
1092 filp_close(flp, current->files);
1093 return -ENOENT; 1073 return -ENOENT;
1094 } 1074 }
1095 filp_close(flp, current->files);
1096 1075
1097 /* Check for autolink in config params */ 1076 /* Check for autolink in config params */
1098 /* 1077 /*
diff --git a/drivers/staging/gdm72xx/sdio_boot.c b/drivers/staging/gdm72xx/sdio_boot.c
index 760efee23d4a..65624bca8b3a 100644
--- a/drivers/staging/gdm72xx/sdio_boot.c
+++ b/drivers/staging/gdm72xx/sdio_boot.c
@@ -66,9 +66,8 @@ static int download_image(struct sdio_func *func, char *img_name)
66 return -ENOENT; 66 return -ENOENT;
67 } 67 }
68 68
69 if (filp->f_dentry) 69 inode = filp->f_dentry->d_inode;
70 inode = filp->f_dentry->d_inode; 70 if (!S_ISREG(inode->i_mode)) {
71 if (!inode || !S_ISREG(inode->i_mode)) {
72 printk(KERN_ERR "Invalid file type: %s\n", img_name); 71 printk(KERN_ERR "Invalid file type: %s\n", img_name);
73 ret = -EINVAL; 72 ret = -EINVAL;
74 goto out; 73 goto out;
@@ -123,7 +122,7 @@ static int download_image(struct sdio_func *func, char *img_name)
123 pno++; 122 pno++;
124 } 123 }
125out: 124out:
126 filp_close(filp, current->files); 125 filp_close(filp, NULL);
127 return ret; 126 return ret;
128} 127}
129 128
diff --git a/drivers/staging/gdm72xx/usb_boot.c b/drivers/staging/gdm72xx/usb_boot.c
index fef290c38db6..e3dbd5a552ca 100644
--- a/drivers/staging/gdm72xx/usb_boot.c
+++ b/drivers/staging/gdm72xx/usb_boot.c
@@ -173,14 +173,12 @@ int usb_boot(struct usb_device *usbdev, u16 pid)
173 filp = filp_open(img_name, O_RDONLY | O_LARGEFILE, 0); 173 filp = filp_open(img_name, O_RDONLY | O_LARGEFILE, 0);
174 if (IS_ERR(filp)) { 174 if (IS_ERR(filp)) {
175 printk(KERN_ERR "Can't find %s.\n", img_name); 175 printk(KERN_ERR "Can't find %s.\n", img_name);
176 set_fs(fs);
177 ret = PTR_ERR(filp); 176 ret = PTR_ERR(filp);
178 goto restore_fs; 177 goto restore_fs;
179 } 178 }
180 179
181 if (filp->f_dentry) 180 inode = filp->f_dentry->d_inode;
182 inode = filp->f_dentry->d_inode; 181 if (!S_ISREG(inode->i_mode)) {
183 if (!inode || !S_ISREG(inode->i_mode)) {
184 printk(KERN_ERR "Invalid file type: %s\n", img_name); 182 printk(KERN_ERR "Invalid file type: %s\n", img_name);
185 ret = -EINVAL; 183 ret = -EINVAL;
186 goto out; 184 goto out;
@@ -262,7 +260,7 @@ int usb_boot(struct usb_device *usbdev, u16 pid)
262 ret = -EINVAL; 260 ret = -EINVAL;
263 } 261 }
264out: 262out:
265 filp_close(filp, current->files); 263 filp_close(filp, NULL);
266 264
267restore_fs: 265restore_fs:
268 set_fs(fs); 266 set_fs(fs);
@@ -322,13 +320,11 @@ static int em_download_image(struct usb_device *usbdev, char *path,
322 goto restore_fs; 320 goto restore_fs;
323 } 321 }
324 322
325 if (filp->f_dentry) { 323 inode = filp->f_dentry->d_inode;
326 inode = filp->f_dentry->d_inode; 324 if (!S_ISREG(inode->i_mode)) {
327 if (!inode || !S_ISREG(inode->i_mode)) { 325 printk(KERN_ERR "Invalid file type: %s\n", path);
328 printk(KERN_ERR "Invalid file type: %s\n", path); 326 ret = -EINVAL;
329 ret = -EINVAL; 327 goto out;
330 goto out;
331 }
332 } 328 }
333 329
334 buf = kmalloc(DOWNLOAD_CHUCK + pad_size, GFP_KERNEL); 330 buf = kmalloc(DOWNLOAD_CHUCK + pad_size, GFP_KERNEL);
@@ -364,7 +360,7 @@ static int em_download_image(struct usb_device *usbdev, char *path,
364 goto out; 360 goto out;
365 361
366out: 362out:
367 filp_close(filp, current->files); 363 filp_close(filp, NULL);
368 364
369restore_fs: 365restore_fs:
370 set_fs(fs); 366 set_fs(fs);
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
index 9e2100551c78..cbb5aaf3e567 100644
--- a/drivers/target/target_core_file.c
+++ b/drivers/target/target_core_file.c
@@ -109,46 +109,29 @@ static struct se_device *fd_create_virtdevice(
109 struct se_subsystem_dev *se_dev, 109 struct se_subsystem_dev *se_dev,
110 void *p) 110 void *p)
111{ 111{
112 char *dev_p = NULL;
113 struct se_device *dev; 112 struct se_device *dev;
114 struct se_dev_limits dev_limits; 113 struct se_dev_limits dev_limits;
115 struct queue_limits *limits; 114 struct queue_limits *limits;
116 struct fd_dev *fd_dev = p; 115 struct fd_dev *fd_dev = p;
117 struct fd_host *fd_host = hba->hba_ptr; 116 struct fd_host *fd_host = hba->hba_ptr;
118 mm_segment_t old_fs;
119 struct file *file; 117 struct file *file;
120 struct inode *inode = NULL; 118 struct inode *inode = NULL;
121 int dev_flags = 0, flags, ret = -EINVAL; 119 int dev_flags = 0, flags, ret = -EINVAL;
122 120
123 memset(&dev_limits, 0, sizeof(struct se_dev_limits)); 121 memset(&dev_limits, 0, sizeof(struct se_dev_limits));
124 122
125 old_fs = get_fs();
126 set_fs(get_ds());
127 dev_p = getname(fd_dev->fd_dev_name);
128 set_fs(old_fs);
129
130 if (IS_ERR(dev_p)) {
131 pr_err("getname(%s) failed: %lu\n",
132 fd_dev->fd_dev_name, IS_ERR(dev_p));
133 ret = PTR_ERR(dev_p);
134 goto fail;
135 }
136 /* 123 /*
137 * Use O_DSYNC by default instead of O_SYNC to forgo syncing 124 * Use O_DSYNC by default instead of O_SYNC to forgo syncing
138 * of pure timestamp updates. 125 * of pure timestamp updates.
139 */ 126 */
140 flags = O_RDWR | O_CREAT | O_LARGEFILE | O_DSYNC; 127 flags = O_RDWR | O_CREAT | O_LARGEFILE | O_DSYNC;
141 128
142 file = filp_open(dev_p, flags, 0600); 129 file = filp_open(fd_dev->fd_dev_name, flags, 0600);
143 if (IS_ERR(file)) { 130 if (IS_ERR(file)) {
144 pr_err("filp_open(%s) failed\n", dev_p); 131 pr_err("filp_open(%s) failed\n", fd_dev->fd_dev_name);
145 ret = PTR_ERR(file); 132 ret = PTR_ERR(file);
146 goto fail; 133 goto fail;
147 } 134 }
148 if (!file || !file->f_dentry) {
149 pr_err("filp_open(%s) failed\n", dev_p);
150 goto fail;
151 }
152 fd_dev->fd_file = file; 135 fd_dev->fd_file = file;
153 /* 136 /*
154 * If using a block backend with this struct file, we extract 137 * If using a block backend with this struct file, we extract
@@ -212,14 +195,12 @@ static struct se_device *fd_create_virtdevice(
212 " %llu total bytes\n", fd_host->fd_host_id, fd_dev->fd_dev_id, 195 " %llu total bytes\n", fd_host->fd_host_id, fd_dev->fd_dev_id,
213 fd_dev->fd_dev_name, fd_dev->fd_dev_size); 196 fd_dev->fd_dev_name, fd_dev->fd_dev_size);
214 197
215 putname(dev_p);
216 return dev; 198 return dev;
217fail: 199fail:
218 if (fd_dev->fd_file) { 200 if (fd_dev->fd_file) {
219 filp_close(fd_dev->fd_file, NULL); 201 filp_close(fd_dev->fd_file, NULL);
220 fd_dev->fd_file = NULL; 202 fd_dev->fd_file = NULL;
221 } 203 }
222 putname(dev_p);
223 return ERR_PTR(ret); 204 return ERR_PTR(ret);
224} 205}
225 206
@@ -452,14 +433,11 @@ static ssize_t fd_set_configfs_dev_params(
452 token = match_token(ptr, tokens, args); 433 token = match_token(ptr, tokens, args);
453 switch (token) { 434 switch (token) {
454 case Opt_fd_dev_name: 435 case Opt_fd_dev_name:
455 arg_p = match_strdup(&args[0]); 436 if (match_strlcpy(fd_dev->fd_dev_name, &args[0],
456 if (!arg_p) { 437 FD_MAX_DEV_NAME) == 0) {
457 ret = -ENOMEM; 438 ret = -EINVAL;
458 break; 439 break;
459 } 440 }
460 snprintf(fd_dev->fd_dev_name, FD_MAX_DEV_NAME,
461 "%s", arg_p);
462 kfree(arg_p);
463 pr_debug("FILEIO: Referencing Path: %s\n", 441 pr_debug("FILEIO: Referencing Path: %s\n",
464 fd_dev->fd_dev_name); 442 fd_dev->fd_dev_name);
465 fd_dev->fbd_flags |= FBDF_HAS_PATH; 443 fd_dev->fbd_flags |= FBDF_HAS_PATH;
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index ae8b18869b8c..8d9bcd8207c8 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -656,9 +656,8 @@ static int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
656 if (!(filp->f_mode & FMODE_WRITE)) 656 if (!(filp->f_mode & FMODE_WRITE))
657 ro = 1; 657 ro = 1;
658 658
659 if (filp->f_path.dentry) 659 inode = filp->f_path.dentry->d_inode;
660 inode = filp->f_path.dentry->d_inode; 660 if ((!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))) {
661 if (!inode || (!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))) {
662 LINFO(curlun, "invalid file type: %s\n", filename); 661 LINFO(curlun, "invalid file type: %s\n", filename);
663 goto out; 662 goto out;
664 } 663 }
@@ -667,7 +666,7 @@ static int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
667 * If we can't read the file, it's no good. 666 * If we can't read the file, it's no good.
668 * If we can't write the file, use it read-only. 667 * If we can't write the file, use it read-only.
669 */ 668 */
670 if (!filp->f_op || !(filp->f_op->read || filp->f_op->aio_read)) { 669 if (!(filp->f_op->read || filp->f_op->aio_read)) {
671 LINFO(curlun, "file not readable: %s\n", filename); 670 LINFO(curlun, "file not readable: %s\n", filename);
672 goto out; 671 goto out;
673 } 672 }
@@ -712,7 +711,6 @@ static int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
712 if (fsg_lun_is_open(curlun)) 711 if (fsg_lun_is_open(curlun))
713 fsg_lun_close(curlun); 712 fsg_lun_close(curlun);
714 713
715 get_file(filp);
716 curlun->blksize = blksize; 714 curlun->blksize = blksize;
717 curlun->blkbits = blkbits; 715 curlun->blkbits = blkbits;
718 curlun->ro = ro; 716 curlun->ro = ro;
@@ -720,10 +718,10 @@ static int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
720 curlun->file_length = size; 718 curlun->file_length = size;
721 curlun->num_sectors = num_sectors; 719 curlun->num_sectors = num_sectors;
722 LDBG(curlun, "open backing file: %s\n", filename); 720 LDBG(curlun, "open backing file: %s\n", filename);
723 rc = 0; 721 return 0;
724 722
725out: 723out:
726 filp_close(filp, current->files); 724 fput(filp);
727 return rc; 725 return rc;
728} 726}
729 727
diff --git a/drivers/usb/gadget/u_uac1.c b/drivers/usb/gadget/u_uac1.c
index af9898982059..e0c5e88e03ed 100644
--- a/drivers/usb/gadget/u_uac1.c
+++ b/drivers/usb/gadget/u_uac1.c
@@ -275,17 +275,17 @@ static int gaudio_close_snd_dev(struct gaudio *gau)
275 /* Close control device */ 275 /* Close control device */
276 snd = &gau->control; 276 snd = &gau->control;
277 if (snd->filp) 277 if (snd->filp)
278 filp_close(snd->filp, current->files); 278 filp_close(snd->filp, NULL);
279 279
280 /* Close PCM playback device and setup substream */ 280 /* Close PCM playback device and setup substream */
281 snd = &gau->playback; 281 snd = &gau->playback;
282 if (snd->filp) 282 if (snd->filp)
283 filp_close(snd->filp, current->files); 283 filp_close(snd->filp, NULL);
284 284
285 /* Close PCM capture device and setup substream */ 285 /* Close PCM capture device and setup substream */
286 snd = &gau->capture; 286 snd = &gau->capture;
287 if (snd->filp) 287 if (snd->filp)
288 filp_close(snd->filp, current->files); 288 filp_close(snd->filp, NULL);
289 289
290 return 0; 290 return 0;
291} 291}
diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c
index 1ddeb11659d4..64cda560c488 100644
--- a/drivers/video/fb_defio.c
+++ b/drivers/video/fb_defio.c
@@ -104,6 +104,8 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma,
104 deferred framebuffer IO. then if userspace touches a page 104 deferred framebuffer IO. then if userspace touches a page
105 again, we repeat the same scheme */ 105 again, we repeat the same scheme */
106 106
107 file_update_time(vma->vm_file);
108
107 /* protect against the workqueue changing the page list */ 109 /* protect against the workqueue changing the page list */
108 mutex_lock(&fbdefio->lock); 110 mutex_lock(&fbdefio->lock);
109 111