CIFS: fiemap: do not return EINVAL if get nothing
[muen/linux.git] / fs / cifs / smb2ops.c
index 3dddd20..cfe9b80 100644 (file)
@@ -3419,7 +3419,7 @@ static int smb3_fiemap(struct cifs_tcon *tcon,
        if (rc)
                goto out;
 
-       if (out_data_len < sizeof(struct file_allocated_range_buffer)) {
+       if (out_data_len && out_data_len < sizeof(struct file_allocated_range_buffer)) {
                rc = -EINVAL;
                goto out;
        }