Advertisement
ffilz

fragment of fsal_rename

May 5th, 2016
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.95 KB | None | 0 0
  1.         fsal_status = dir_src->obj_ops.rename(lookup_src, dir_src, oldname,
  2.                                               dir_dest, newname);
  3.  
  4.         LogFullDebug(COMPONENT_FSAL, "returned from FSAL rename");
  5.  
  6.         if (FSAL_IS_ERROR(fsal_status)) {
  7.  
  8.                 LogFullDebug(COMPONENT_FSAL,
  9.                              "FSAL rename failed with %s",
  10.                              fsal_err_txt(fsal_status));
  11.  
  12.                 goto out;
  13.         }
  14.  
  15.         if (lookup_dst) {
  16.                 /* The issue here is this function call wipes out fsal_status...
  17.                  * declaring a new fsal_status local to this block causes crash
  18.                  * to go away.
  19.                  *
  20.                  * This whole code block is suspect...
  21.                  */
  22.                 fsal_status = fsal_refresh_attrs(lookup_dst);
  23.                 if (FSAL_IS_ERROR(fsal_status) &&
  24.                     fsal_status.major != ERR_FSAL_STALE)
  25.                         goto out;
  26.         }
  27.  
  28. out:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement