+#include "cifsfs.h"
+
+static __u32 convert_to_cifs_notify_flags(unsigned long fcntl_notify_flags)
+{
+ __u32 cifs_ntfy_flags = 0;
+
+ /* No way on Linux VFS to ask to monitor xattr
+ changes (and no stream support either */
+ if(fcntl_notify_flags & DN_ACCESS) {
+ cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_LAST_ACCESS;
+ }
+ if(fcntl_notify_flags & DN_MODIFY) {
+ /* What does this mean on directories? */
+ cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_LAST_WRITE |
+ FILE_NOTIFY_CHANGE_SIZE;
+ }
+ if(fcntl_notify_flags & DN_CREATE) {
+ cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_CREATION |
+ FILE_NOTIFY_CHANGE_LAST_WRITE;
+ }
+ if(fcntl_notify_flags & DN_DELETE) {
+ cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_LAST_WRITE;
+ }
+ if(fcntl_notify_flags & DN_RENAME) {
+ /* BB review this - checking various server behaviors */
+ cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_DIR_NAME |
+ FILE_NOTIFY_CHANGE_FILE_NAME;
+ }
+ if(fcntl_notify_flags & DN_ATTRIB) {
+ cifs_ntfy_flags |= FILE_NOTIFY_CHANGE_SECURITY |
+ FILE_NOTIFY_CHANGE_ATTRIBUTES;
+ }
+/* if(fcntl_notify_flags & DN_MULTISHOT) {
+ cifs_ntfy_flags |= ;
+ } */ /* BB fixme - not sure how to handle this with CIFS yet */
+
+
+ return cifs_ntfy_flags;
+}