From: Charles Manning Date: Mon, 6 Aug 2018 21:48:35 +0000 (+1200) Subject: Merge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2 X-Git-Url: https://yaffs.net/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=3de09ef5a181999f7340462154034b727827e4fa;hp=-c Merge branch 'master' of ssh://aleph1.co.uk/home/aleph1/git/yaffs2 --- 3de09ef5a181999f7340462154034b727827e4fa diff --combined yaffs_vfs_multi.c index e2f002e,de3dd75..e763e0c --- a/yaffs_vfs_multi.c +++ b/yaffs_vfs_multi.c @@@ -1,8 -1,7 +1,7 @@@ /* * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. * - * Copyright (C) 2002-2011 Aleph One Ltd. - * for Toby Churchill Ltd and Brightstar Engineering + * Copyright (C) 2002-2018 Aleph One Ltd. * * Created by Charles Manning * Acknowledgements: @@@ -250,10 -249,11 +249,10 @@@ MODULE_PARM(yaffs_gc_control, "i") #include #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) #define PAGE_CACHE_SIZE PAGE_SIZE #define PAGE_CACHE_SHIFT PAGE_SHIFT #define Y_GET_DENTRY(f) ((f)->f_path.dentry) -#define page_cache_release put_page #define YAFFS_NEW_XATTR 1 #define YAFFS_NEW_GET_LINK 1 #else @@@ -262,10 -262,6 +261,10 @@@ #define YAFFS_NEW_GET_LINK 0 #endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)) +#define page_cache_release put_page +#endif + #define update_dir_time(dir) do {\ (dir)->i_ctime = (dir)->i_mtime = CURRENT_TIME; \ } while (0) @@@ -804,7 -800,7 +803,7 @@@ static int yaffs_sync_object(struct fil #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 22)) static const struct file_operations yaffs_file_operations = { #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0) .read = new_sync_read, .write = new_sync_write, #endif @@@ -977,7 -973,7 +976,7 @@@ static int yaffs_setxattr(struct dentr return error; } -#ifdef YAFFS_NEW_XATTR +#if (YAFFS_NEW_XATTR > 0) static ssize_t yaffs_getxattr(struct dentry * dentry, struct inode *inode, const char *name, void *buff, size_t size) { @@@ -1820,8 -1816,10 +1819,10 @@@ static int yaffs_iterate(struct file *f goto out; } - if (!dir_emit_dots(f, dc)) + if (!dir_emit_dots(f, dc)) { + yaffs_gross_unlock(dev); return 0; + } curoffs = 1;