diff options
Diffstat (limited to 'fs/cifs/cifssmb.c')
| -rw-r--r-- | fs/cifs/cifssmb.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index f213b8ae43c1..184a399749a6 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
| @@ -1810,8 +1810,21 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
| 1810 | } | 1810 | } |
| 1811 | parm_data = (struct cifs_posix_lock *) | 1811 | parm_data = (struct cifs_posix_lock *) |
| 1812 | ((char *)&pSMBr->hdr.Protocol + data_offset); | 1812 | ((char *)&pSMBr->hdr.Protocol + data_offset); |
| 1813 | if (parm_data->lock_type == cpu_to_le16(CIFS_UNLCK)) | 1813 | if (parm_data->lock_type == __constant_cpu_to_le16(CIFS_UNLCK)) |
| 1814 | pLockData->fl_type = F_UNLCK; | 1814 | pLockData->fl_type = F_UNLCK; |
| 1815 | else { | ||
| 1816 | if (parm_data->lock_type == | ||
| 1817 | __constant_cpu_to_le16(CIFS_RDLCK)) | ||
| 1818 | pLockData->fl_type = F_RDLCK; | ||
| 1819 | else if (parm_data->lock_type == | ||
| 1820 | __constant_cpu_to_le16(CIFS_WRLCK)) | ||
| 1821 | pLockData->fl_type = F_WRLCK; | ||
| 1822 | |||
| 1823 | pLockData->fl_start = parm_data->start; | ||
| 1824 | pLockData->fl_end = parm_data->start + | ||
| 1825 | parm_data->length - 1; | ||
| 1826 | pLockData->fl_pid = parm_data->pid; | ||
| 1827 | } | ||
| 1815 | } | 1828 | } |
| 1816 | 1829 | ||
| 1817 | plk_err_exit: | 1830 | plk_err_exit: |
