aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/exfat (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-12-10staging: exfat: fix multiple definition error of `rename_file'Brendan Higgins3-6/+6
`rename_file' was exported but not properly namespaced causing a multiple definition error because `rename_file' is already defined in fs/hostfs/hostfs_user.c: ld: drivers/staging/exfat/exfat_core.o: in function `rename_file': drivers/staging/exfat/exfat_core.c:2327: multiple definition of `rename_file'; fs/hostfs/hostfs_user.o:fs/hostfs/hostfs_user.c:350: first defined here make: *** [Makefile:1077: vmlinux] Error 1 This error can be reproduced on ARCH=um by selecting: CONFIG_EXFAT_FS=y CONFIG_HOSTFS=y Add a namespace prefix exfat_* to fix this error. Reported-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Brendan Higgins <brendanhiggins@google.com> Cc: stable <stable@vger.kernel.org> Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu> Tested-by: David Gow <davidgow@google.com> Reviewed-by: David Gow <davidgow@google.com> Link: https://lore.kernel.org/r/20191204234522.42855-1-brendanhiggins@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-10staging: exfat: properly support discard in clr_alloc_bitmap()Andrea Righi1-2/+4
Currently the discard code in clr_alloc_bitmap() is just dead code. Move code around so that the discard operation is properly attempted when enabled. Signed-off-by: Andrea Righi <andrea.righi@canonical.com> Link: https://lore.kernel.org/r/20191205152913.GJ3276@xps-13 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-15staging: exfat: fix spelling mistake "maont" -> "mount"Colin Ian King1-1/+1
There is a spelling mistake in a kernel info message. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20191114221509.10728-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-15staging: exfat: remove two unused functionsYueHaibing1-35/+0
Fix sparse warnings: drivers/staging/exfat/exfat_core.c:2045:4: warning: symbol 'calc_checksum_1byte' was not declared. Should it be static? drivers/staging/exfat/exfat_core.c:2080:5: warning: symbol 'calc_checksum_4byte' was not declared. Should it be static? The two functions has no caller in tree, so remove it. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20191114140348.46088-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-14staging: exfat: fix indentation issueColin Ian King1-1/+1
There is a declaration that requires indentation. Add in the missing tab. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20191113164210.103586-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Update the TODO fileValdis Kletnieks1-11/+59
Updating with the current laundry list of things that need attention. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112223609.163501-1-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up the namespace pollution part 8Valdis Kletnieks4-51/+51
Rename all the FAT_* functions to exfat_fat_*. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-13-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up the namespace pollution part 7Valdis Kletnieks4-74/+74
Global functions called 'buf*' are a linkage editor disaster waiting to happen. Rename our buf_* functions to exfat_buf_* Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-12-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up the namespace pollution part 6Valdis Kletnieks2-93/+85
Move a few more things so we can make them static and clear exfat.h out. At this point, pretty much everything that can be static is static. (Note: FAT_sync(), buf_sync(), and sync_alloc_bitmap() aren't called anyplace, but aren't static because (a) that will toss an error and (b) they probably *should* be getting called someplace Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-11-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up the namespace pollution part 5Valdis Kletnieks2-94/+91
Some more functions that can be moved and made static Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-10-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up the namespace pollution part 4Valdis Kletnieks2-43/+39
Relocating these functions to before first use lets us make them static Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-9-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up the namespace pollution part 3Valdis Kletnieks2-10/+4
These functions are only used in the local file, make them static Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-8-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up the namespace pollution part 2Valdis Kletnieks4-22/+22
Rename all the bdev_* to exfat_bdev_* Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-7-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up the namespace pollution part 1Valdis Kletnieks2-53/+21
Everything referenced in the struct fs_func exfat_fs_func is located in that same .c file. Make them static and remove from exfat.h Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-6-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Remove FAT/VFAT mount support, part 4Valdis Kletnieks3-348/+0
The code simplification from the previous patch rendered a few more routines unreferenced, so heave them over the side as well. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-5-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Remove FAT/VFAT mount support, part 3Valdis Kletnieks3-561/+148
In this patch, we straighten out most of the cases where the code was testing 'p_fs->vol_type == EXFAT' and '!= EXFAT' There's still some ?: ops and a few places where the code is doing checks for '.' and '..' that require looking at, but those are future patches Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-4-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Remove FAT/VFAT mount support, part 2Valdis Kletnieks2-663/+0
Remove no longer referenced FAT/VFAT routines. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-3-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Remove FAT/VFAT mount support, part 1Valdis Kletnieks4-211/+1
Remove the top-level mount functionality, to make this driver handle only exfat file systems. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112211238.156490-2-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Correct return codeValdis Kletnieks1-1/+1
Use -ENOTEMPTY rather than -EEXIST for attempting to remove a directory that still has files in it. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-10-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Collapse redundant return code translationsValdis Kletnieks1-78/+14
Now that we no longer use odd internal return codes, we can heave the translation code over the side, and just pass the error code back up the call chain. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-9-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_SUCCESSValdis Kletnieks4-82/+79
Convert FFS_SUCCESS to 0. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-8-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - remove unused codesValdis Kletnieks1-6/+0
There are 6 FFS_* error values not used at all. Remove them. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-7-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_ERRORValdis Kletnieks3-16/+15
Convert FFS_ERROR to -EINVAL Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-6-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_INVALIDFIDValdis Kletnieks2-6/+5
Covert FFS_INVALIDFID to -EINVAL Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-5-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_EOFValdis Kletnieks2-2/+1
Convert FFS_EOF to return 0 for a zero-length read() as per 'man 2 read'. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-4-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_MEDIAERRValdis Kletnieks4-107/+107
Convert FFS_MEDIAERR to (mostly) -ENOENT and -EIO. Some additional code surgery needed to propogate correct error codes upwards. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-3-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: exfat: Clean up return codes - FFS_FORMATERRValdis Kletnieks3-6/+7
Convert FFS_FORMATERR to -EFSCORRUPTED Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191112021000.42091-2-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: exfat: use prandom_u32() for i_generationArnd Bergmann1-2/+2
Similar to commit 46c9a946d766 ("shmem: use monotonic time for i_generation") we should not use the deprecated get_seconds() interface for i_generation. prandom_u32() is the replacement used in other file systems. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191108213257.3097633-2-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-03staging: exfat: Ensure we unlock upon error in ffsReadFileDavidlohr Bueso1-2/+4
The call was not releasing the mutex upon error. Reported-by: kbuild test robot <lkp@intel.com> Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Acked-By: Valdis Kletnieks <valdis.kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191103180921.2844-1-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-03staging: exfat: Fix logical operation continuationFrank A. Cancio Bello1-4/+4
Operators inside a multiline logical expression should be at the end of the line not at the beginning. This patch fixes two of those cases and remove an unnecessary parenthesis too, to comply in that way with the preferred coding style for the linux kernel. Suggested-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Link: https://lore.kernel.org/r/ace2cbd5e4c03751fb522e7bbd60149e7ed969ae.1572666556.git.frank@generalsoftwareinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-03staging: exfat: Fix parameter alignment issuesFrank A. Cancio Bello1-2/+3
Fix alignment to match open parenthesis to comply in that way with the preferred coding style for the linux kernel. Issue found by checkpatch. Suggested-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Link: https://lore.kernel.org/r/fe316e694ea9c4aa370d3a8166a3680feb342682.1572666556.git.frank@generalsoftwareinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-02drivers/staging/exfat: Replace more binary semaphores with mutexesDavidlohr Bueso1-24/+24
At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal than semaphores; it's also a nicer interface for mutual exclusion, which is why they are encouraged over binary semaphores, when possible. There is also lockdep support. For both f_sem and b_sem, their semantics imply traditional lock ownership; that is, the lock owner is the same for both lock/unlock operations and not under irq contexts (ie for trylock/unlock scenarios). Therefore it is safe to convert. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20191101185332.31786-1-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-01staging: exfat: replace kmalloc with kmalloc_arrayRoi Martin1-4/+4
Replace expressions of the form: kmalloc(count * size, GFP_KERNEL); With: kmalloc_array(count, size, GFP_KERNEL); Signed-off-by: Roi Martin <jroi.martin@gmail.com> Link: https://lore.kernel.org/r/20191031123139.32361-1-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-01drivers/staging/exfat: Replace binary semaphores for mutexesDavidlohr Bueso2-43/+43
At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal than semaphores; it's also a nicer interface for mutual exclusion, which is why they are encouraged over binary semaphores, when possible. For both v_sem and z_sem, their semantics imply traditional lock ownership; that is, the lock owner is the same for both lock/unlock operations. Therefore it is safe to convert. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Acked-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191030144916.10802-1-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-30staging: exfat: avoid multiple assignmentsRoi Martin2-20/+73
Fix checkpatch.pl warning: CHECK: multiple assignments should be avoided Signed-off-by: Roi Martin <jroi.martin@gmail.com> Link: https://lore.kernel.org/r/20191030010328.10203-6-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-30staging: exfat: replace printk(KERN_INFO ...) with pr_info()Roi Martin1-1/+1
Fix checkpatch.pl warning: WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Roi Martin <jroi.martin@gmail.com> Link: https://lore.kernel.org/r/20191030010328.10203-5-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-30staging: exfat: remove unnecessary new line in if conditionRoi Martin1-2/+1
Fix checkpatch.pl warning: CHECK: Logical continuations should be on the previous line Signed-off-by: Roi Martin <jroi.martin@gmail.com> Link: https://lore.kernel.org/r/20191030010328.10203-4-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-30staging: exfat: make alignment match open parenthesisRoi Martin1-6/+6
Fix checkpatch.pl warning: CHECK: Alignment should match open parenthesis Signed-off-by: Roi Martin <jroi.martin@gmail.com> Link: https://lore.kernel.org/r/20191030010328.10203-3-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-30staging: exfat: remove unnecessary parenthesesRoi Martin2-34/+34
Fix checkpatch.pl warning: CHECK: Unnecessary parentheses around ... Signed-off-by: Roi Martin <jroi.martin@gmail.com> Link: https://lore.kernel.org/r/20191030010328.10203-2-jroi.martin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: exfat: Clean up return code - FFS_MEMORYERRValdis Kletnieks2-6/+5
Convert FFS_MEMORYERR to -ENOMEM Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191024155327.1095907-9-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: exfat: Clean up return codes - FFS_INVALIDPATHValdis Kletnieks3-11/+10
Convert FFS_INVALIDPATH to -EINVAL Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191024155327.1095907-8-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: exfat: Clean up return codes - FFS_FILEEXISTValdis Kletnieks3-9/+8
Convert FFS_FILEEXIST to -EEXIST Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191024155327.1095907-7-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: exfat: Clean up return codes - FFS_NAMETOOLONGValdis Kletnieks2-3/+2
Convert FFS_NOTNAMETOOLONG to -ENAMETOOLONG Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191024155327.1095907-6-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: exfat: Clean up return codes - FFS_PERMISSIONERRValdis Kletnieks2-11/+10
Convert FFS_PERMISSIONERR to -EPERM Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191024155327.1095907-5-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: exfat: Clean up return codes - FFS_DIRBUSYValdis Kletnieks2-2/+1
Convert FFS_DIRBUSY to -EBUSY Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191024155327.1095907-4-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: exfat: Clean up return codes - FFS_NOTFOUNDValdis Kletnieks2-4/+3
Convert FFS_NOTFOUND to -ENOENT Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191024155327.1095907-3-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: exfat: Clean up return codes - FFS_FULLValdis Kletnieks3-14/+13
Start cleaning up the odd scheme of return codes, starting with FFS_FULL Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Link: https://lore.kernel.org/r/20191024155327.1095907-2-Valdis.Kletnieks@vt.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-14Merge 5.4-rc3 into staging-nextGreg Kroah-Hartman9-11/+13
We want the staging driver fixes in here as well to build on and test with. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-04staging: exfat: Use kvzalloc() instead of kzalloc() for exfat_sb_infoJia-Ye Li1-2/+3
Fix mount failed "Cannot allocate memory". When the memory gets fragmented, kzalloc() might fail to allocate physically contiguous pages for the struct exfat_sb_info (its size is about 34KiB) even the total free memory is enough. Use kvzalloc() to solve this problem. Reviewed-by: Ethan Wu <ethanwu@synology.com> Signed-off-by: Jia-Ye Li <jiayeli@synology.com> Link: https://lore.kernel.org/r/20190925083729.4653-1-jiayeli@synology.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-04staging: exfat: explain the fs_sync() issue in TODOValdis Klētnieks1-0/+9
We've seen several incorrect patches for fs_sync() calls in the exfat driver. Add code to the TODO that explains this isn't just a delete code and refactor, but that actual analysis of when the filesystem should be flushed to disk needs to be done. Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Link: https://lore.kernel.org/r/9837.1570042895@turing-police Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>