You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
...
pr_err(DRV_NAME"Unable To Open File %s, err %ld", path, PTR_ERR(flp));
168
163
flp=NULL;
@@ -183,14 +178,12 @@ static int BcmFileDownload(struct bcm_mini_adapter *Adapter, const char *path, u
183
178
{
184
179
interrorno=0;
185
180
structfile*flp=NULL;
186
-
mm_segment_toldfs;
187
181
structtimevaltv= {0};
188
182
189
183
flp=open_firmware_file(Adapter, path);
190
184
if (!flp) {
191
-
errorno=-ENOENT;
192
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
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
189
do_gettimeofday(&tv);
@@ -201,23 +194,15 @@ static int BcmFileDownload(struct bcm_mini_adapter *Adapter, const char *path, u
201
194
errorno=-EIO;
202
195
goto exit_download;
203
196
}
204
-
oldfs=get_fs();
205
-
set_fs(get_ds());
206
197
vfs_llseek(flp, 0, 0);
207
-
set_fs(oldfs);
208
198
if (Adapter->bcm_file_readback_from_chip(Adapter->pvInterfaceAdapter, flp, loc)) {
209
199
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Failed to read back firmware!");
210
200
errorno=-EIO;
211
201
goto exit_download;
212
202
}
213
203
214
204
exit_download:
215
-
oldfs=get_fs();
216
-
set_fs(get_ds());
217
-
if (flp&& !(IS_ERR(flp)))
218
-
filp_close(flp, current->files);
219
-
set_fs(oldfs);
220
-
205
+
filp_close(flp, NULL);
221
206
returnerrorno;
222
207
}
223
208
@@ -1056,10 +1041,8 @@ int InitCardAndDownloadFirmware(struct bcm_mini_adapter *ps_adapter)
0 commit comments