Skip to contentSkip to conversation

fs: f2fs: changed variable type of offset "unsigned" to "loff_t"

PATCH In review youngjun yoo 2 participants 2 messages May 29, 2018 – May 30, 2018 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 fs: f2fs: changed variable type of offset "unsigned" to "loff_t"

clean up checkpatch warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

---
 fs/f2fs/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/f2fs/file.c +2 -2
index cc08956..5ae120f 100644
@@ -95,7 +95,7 @@ static int f2fs_vm_page_mkwrite(struct vm_fault *vmf)
 	/* page is wholly or partially inside EOF */
 	if (((loff_t)(page->index + 1) << PAGE_SHIFT) >
 						i_size_read(inode)) {
-		unsigned offset;
+		loff_t offset;
 		offset = i_size_read(inode) & ~PAGE_MASK;
 		zero_user_segment(page, offset, PAGE_SIZE);
 	}
@@ -539,7 +539,7 @@ void truncate_data_blocks(struct dnode_of_data *dn)
 static int truncate_partial_data_page(struct inode *inode, u64 from,
 								bool cache_only)
 {
-	unsigned offset = from & (PAGE_SIZE - 1);
+	loff_t offset = from & (PAGE_SIZE - 1);
 	pgoff_t index = from >> PAGE_SHIFT;
 	struct address_space *mapping = inode->i_mapping;
 	struct page *page;
Signature · 6 lines
2.7.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot