Whamcloud - gitweb
LU-683: handle short write in cl_io_commit_write
[fs/lustre-release.git] / lustre / llite / rw26.c
index b931dfa..15df5fc 100644 (file)
@@ -506,11 +506,12 @@ static int ll_write_end(struct file *file, struct address_space *mapping,
 {
         unsigned from = pos & (PAGE_CACHE_SIZE - 1);
         int rc;
-        rc = ll_commit_write(file, page, from, from + copied);
 
+        rc = ll_commit_write(file, page, from, from + copied);
         unlock_page(page);
         page_cache_release(page);
-        return rc?rc:copied;
+
+        return rc ?: copied;
 }
 #endif