Changeset 95210 in vbox for trunk/src/VBox/Additions/linux
- Timestamp:
- Jun 6, 2022 7:34:35 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151718
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/sharedfolders/regops.c
r94502 r95210 3582 3582 * shared+writeable fashion. 3583 3583 */ 3584 #if RTLNX_VER_MIN(5,19,0) 3585 static int vbsf_read_folio(struct file *file, struct folio *folio) 3586 { 3587 struct page *page = &folio->page; 3588 #else 3584 3589 static int vbsf_readpage(struct file *file, struct page *page) 3585 3590 { 3591 #endif 3586 3592 struct inode *inode = VBSF_GET_F_DENTRY(file)->d_inode; 3587 3593 int err; … … 3729 3735 * Called when writing thru the page cache (which we shouldn't be doing). 3730 3736 */ 3731 int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos, 3732 unsigned len, unsigned flags, struct page **pagep, void **fsdata) 3737 static inline void vbsf_write_begin_warn(loff_t pos, unsigned len, unsigned flags) 3733 3738 { 3734 3739 /** @todo r=bird: We shouldn't ever get here, should we? Because we don't use … … 3746 3751 # endif 3747 3752 } 3753 } 3754 3755 # if RTLNX_VER_MIN(5,19,0) 3756 int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos, 3757 unsigned len, struct page **pagep, void **fsdata) 3758 { 3759 vbsf_write_begin_warn(pos, len, 0); 3760 return simple_write_begin(file, mapping, pos, len, pagep, fsdata); 3761 } 3762 # else 3763 int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos, 3764 unsigned len, unsigned flags, struct page **pagep, void **fsdata) 3765 { 3766 vbsf_write_begin_warn(pos, len, flags); 3748 3767 return simple_write_begin(file, mapping, pos, len, flags, pagep, fsdata); 3749 3768 } 3769 # endif 3770 3750 3771 #endif /* KERNEL_VERSION >= 2.6.24 */ 3751 3772 … … 3821 3842 */ 3822 3843 struct address_space_operations vbsf_reg_aops = { 3844 #if RTLNX_VER_MIN(5,19,0) 3845 .read_folio = vbsf_read_folio, 3846 #else 3823 3847 .readpage = vbsf_readpage, 3848 #endif 3824 3849 .writepage = vbsf_writepage, 3825 3850 /** @todo Need .writepages if we want msync performance... */ … … 3843 3868 #endif 3844 3869 }; 3845
Note:
See TracChangeset
for help on using the changeset viewer.