Whamcloud - gitweb
LU-1883 osd: Fix niobuf_local offset usage
[fs/lustre-release.git] / lustre / obdfilter / filter_io_26.c
index 853e4f5..53c293c 100644 (file)
@@ -618,7 +618,8 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
                 loff_t this_size;
                 __u32 flags = lnb->flags;
 
-                if (filter_range_is_mapped(inode, lnb->offset, lnb->len)) {
+               if (filter_range_is_mapped(inode, lnb->lnb_file_offset,
+                                          lnb->len)) {
                         /* If overwriting an existing block,
                          * we don't need a grant */
                         if (!(flags & OBD_BRW_GRANTED) && lnb->rc == -ENOSPC)
@@ -649,7 +650,7 @@ int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
 
                 /* we expect these pages to be in offset order, but we'll
                  * be forgiving */
-                this_size = lnb->offset + lnb->len;
+               this_size = lnb->lnb_file_offset + lnb->len;
                 if (this_size > iattr.ia_size)
                         iattr.ia_size = this_size;