cifs: smb2_clone_range() - exit on unhandled error
authorSachin Prabhu <sprabhu@redhat.com>
Wed, 4 Feb 2015 13:10:26 +0000 (13:10 +0000)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 24 Apr 2015 21:14:00 +0000 (17:14 -0400)
commit6bb88677e8e9a47b643ae03959f3a216d22432ac
tree8d219e00af4bf66fb2010927c444d6163a0e2d1e
parent465dd8c0516a59cefe851ee4c57d53d54f7ef79a
cifs: smb2_clone_range() - exit on unhandled error

[ Upstream commit 2477bc58d49edb1c0baf59df7dc093dce682af2b ]

While attempting to clone a file on a samba server, we receive a
STATUS_INVALID_DEVICE_REQUEST. This is mapped to -EOPNOTSUPP which
isn't handled in smb2_clone_range(). We end up looping in the while loop
making same call to the samba server over and over again.

The proposed fix is to exit and return the error value when encountered
with an unhandled error.

Cc: <stable@vger.kernel.org>
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Steve French <steve.french@primarydata.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/cifs/smb2ops.c