diff --git a/fs/cifs/file.c b/fs/cifs/file.c index b691b89..726d437 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -2061,7 +2061,7 @@ static int cifs_write_begin(struct file *file, struct address_space *mapping, struct page **pagep, void **fsdata) { pgoff_t index = pos >> PAGE_CACHE_SHIFT; - loff_t offset = pos & (PAGE_CACHE_SIZE - 1); + loff_t offset_of_page_start = pos & PAGE_MASK; cFYI(1, ("write_begin from %lld len %d", (long long)pos, len)); @@ -2081,7 +2081,7 @@ static int cifs_write_begin(struct file *file, struct address_space *mapping, int rc; /* might as well read a page, it is fast enough */ - rc = cifs_readpage_worker(file, *pagep, &offset); + rc = cifs_readpage_worker(file, *pagep, &offset_of_page_start); /* we do not need to pass errors back e.g. if we do not have read access to the file