Commit 4ca9c190d902caa7efb899a4c7fc8c6e6d926e95

Authored by Steve French
1 parent 34210f3302

[CIFS] Fix oops in experimental notify code (when CONFIG_CIFS_EXPERIMENTAL

was turned on).

Signed-off-by: Steve French <sfrench@us.ibm.com>

Showing 4 changed files with 12 additions and 1 deletions Side-by-side Diff

... ... @@ -8,7 +8,8 @@
8 8 wsize and rsize can now be larger than negotiated buffer size if server
9 9 supports large readx/writex, even when directio mount flag not specified.
10 10 Write size will in many cases now be 16K instead of 4K which greatly helps
11   -file copy performance on lightly loaded networks.
  11 +file copy performance on lightly loaded networks. Fix oops in dnotify
  12 +when experimental config flag enabled.
12 13  
13 14 Version 1.37
14 15 ------------
... ... @@ -296,6 +296,8 @@
296 296 unused.
297 297 rsize default read size (usually 16K)
298 298 wsize default write size (usually 16K, 32K is often better over GigE)
  299 + maximum wsize currently allowed by CIFS is 57344 (14 4096 byte
  300 + pages)
299 301 rw mount the network share read-write (note that the
300 302 server may still consider the share read-only)
301 303 ro mount network share read-only
... ... @@ -901,6 +901,10 @@
901 901 INIT_LIST_HEAD(&GlobalSMBSessionList);
902 902 INIT_LIST_HEAD(&GlobalTreeConnectionList);
903 903 INIT_LIST_HEAD(&GlobalOplock_Q);
  904 +#ifdef CONFIG_CIFS_EXPERIMENTAL
  905 + INIT_LIST_HEAD(&GlobalDnotifyReqList);
  906 + INIT_LIST_HEAD(&GlobalDnotifyRsp_Q);
  907 +#endif
904 908 /*
905 909 * Initialize Global counters
906 910 */
... ... @@ -78,6 +78,10 @@
78 78 __u32 filter = FILE_NOTIFY_CHANGE_NAME | FILE_NOTIFY_CHANGE_ATTRIBUTES;
79 79 __u16 netfid;
80 80  
  81 +
  82 + if(experimEnabled == 0)
  83 + return 0;
  84 +
81 85 xid = GetXid();
82 86 cifs_sb = CIFS_SB(file->f_dentry->d_sb);
83 87 pTcon = cifs_sb->tcon;