1. 11 Aug, 2014 2 commits
    • Al Viro's avatar
      fix copy_tree() regression · 12a5b529
      Al Viro authored
      Since 3.14 we had copy_tree() get the shadowing wrong - if we had one
      vfsmount shadowing another (i.e. if A is a slave of B, C is mounted
      on A/foo, then D got mounted on B/foo creating D' on A/foo shadowed
      by C), copy_tree() of A would make a copy of D' shadow the the copy of
      C, not the other way around.
      
      It's easy to fix, fortunately - just make sure that mount follows
      the one that shadows it in mnt_child as well as in mnt_hash, and when
      copy_tree() decides to attach a new mount, check if the last child
      it has added to the same parent should be shadowing the new one.
      And if it should, just use the same logics commit_tree() has - put the
      new mount into the hash and children lists right after the one that
      should shadow it.
      
      Cc: stable@vger.kernel.org [3.14 and later]
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      12a5b529
    • Al Viro's avatar
      __generic_file_write_iter(): fix handling of sync error after DIO · 60bb4529
      Al Viro authored
      If DIO results in short write and sync write fails, we want to bugger off
      whether the DIO part has written anything or not; the logics on the return
      will take care of the right return value.
      
      Cc: stable@vger.kernel.org [3.16]
      Reported-by: default avatarAnton Altaparmakov <aia21@cam.ac.uk>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      60bb4529
  2. 07 Aug, 2014 38 commits