aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/mem.c6
-rw-r--r--drivers/usb/gadget/file_storage.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 30eff80fed6f..fba76fb55abf 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -43,7 +43,7 @@ static inline int uncached_access(struct file *file, unsigned long addr)
43{ 43{
44#if defined(CONFIG_IA64) 44#if defined(CONFIG_IA64)
45 /* 45 /*
46 * On ia64, we ignore O_SYNC because we cannot tolerate memory attribute aliases. 46 * On ia64, we ignore O_DSYNC because we cannot tolerate memory attribute aliases.
47 */ 47 */
48 return !(efi_mem_attributes(addr) & EFI_MEMORY_WB); 48 return !(efi_mem_attributes(addr) & EFI_MEMORY_WB);
49#elif defined(CONFIG_MIPS) 49#elif defined(CONFIG_MIPS)
@@ -56,9 +56,9 @@ static inline int uncached_access(struct file *file, unsigned long addr)
56#else 56#else
57 /* 57 /*
58 * Accessing memory above the top the kernel knows about or through a file pointer 58 * Accessing memory above the top the kernel knows about or through a file pointer
59 * that was marked O_SYNC will be done non-cached. 59 * that was marked O_DSYNC will be done non-cached.
60 */ 60 */
61 if (file->f_flags & O_SYNC) 61 if (file->f_flags & O_DSYNC)
62 return 1; 62 return 1;
63 return addr >= __pa(high_memory); 63 return addr >= __pa(high_memory);
64#endif 64#endif
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index 1e6aa504d58a..5e14dbaf65bc 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -1713,7 +1713,7 @@ static int do_write(struct fsg_dev *fsg)
1713 } 1713 }
1714 if (fsg->cmnd[1] & 0x08) { // FUA 1714 if (fsg->cmnd[1] & 0x08) { // FUA
1715 spin_lock(&curlun->filp->f_lock); 1715 spin_lock(&curlun->filp->f_lock);
1716 curlun->filp->f_flags |= O_SYNC; 1716 curlun->filp->f_flags |= O_DSYNC;
1717 spin_unlock(&curlun->filp->f_lock); 1717 spin_unlock(&curlun->filp->f_lock);
1718 } 1718 }
1719 } 1719 }