diff --git a/lustre/ChangeLog b/lustre/ChangeLog
index c9682652e0c4666635591b5a20c8ae5b44cb0723..62841646c0dd92c194eb5d43f96b8d597503139f 100644
--- a/lustre/ChangeLog
+++ b/lustre/ChangeLog
@@ -102,6 +102,14 @@ Details    : in some rare cases it was possible for a client to connect to
 	     an MDS multiple times.  Upon recovery the MDS would detect this
 	     and fail during startup.  Handle this more gracefully.
 
+Severity   : enhancement
+Bugzilla   : 11563
+Description: Add -o localflock option to simulate  old noflock
+behaviour.
+Details    : This will achieve local-only flock/fcntl locks
+	     coherentness.
+
+
 --------------------------------------------------------------------------------
 
 2007-05-03  Cluster File Systems, Inc. <info@clusterfs.com>
diff --git a/lustre/llite/file.c b/lustre/llite/file.c
index 84c9b06566987fde777a862aeecda288b0e1bdaf..947654f66c1053c98dde4611c26e552d362fb53f 100644
--- a/lustre/llite/file.c
+++ b/lustre/llite/file.c
@@ -2612,6 +2612,7 @@ check_capabilities:
 }
 #endif
 
+/* -o localflock - only provides locally consistent flock locks */
 struct file_operations ll_file_operations = {
         .read           = ll_file_read,
         .write          = ll_file_write,
@@ -2624,10 +2625,6 @@ struct file_operations ll_file_operations = {
         .sendfile       = ll_file_sendfile,
 #endif
         .fsync          = ll_fsync,
-#ifdef HAVE_F_OP_FLOCK
-        .flock          = ll_file_noflock,
-#endif
-        .lock           = ll_file_noflock
 };
 
 struct file_operations ll_file_operations_flock = {
@@ -2648,6 +2645,24 @@ struct file_operations ll_file_operations_flock = {
         .lock           = ll_file_flock
 };
 
+/* These are for -o noflock - to return ENOSYS on flock calls */
+struct file_operations ll_file_operations_noflock = {
+        .read           = ll_file_read,
+        .write          = ll_file_write,
+        .ioctl          = ll_file_ioctl,
+        .open           = ll_file_open,
+        .release        = ll_file_release,
+        .mmap           = ll_file_mmap,
+        .llseek         = ll_file_seek,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+        .sendfile       = ll_file_sendfile,
+#endif
+        .fsync          = ll_fsync,
+#ifdef HAVE_F_OP_FLOCK
+        .flock          = ll_file_noflock,
+#endif
+        .lock           = ll_file_noflock
+};
 
 struct inode_operations ll_file_inode_operations = {
 #ifdef LUSTRE_KERNEL_VERSION
diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h
index 0d3e52bc529c52c99918c200097894ef562f1ebd..9303e96d4432158fd1d7f8ee02ab4982dd5a5413 100644
--- a/lustre/llite/llite_internal.h
+++ b/lustre/llite/llite_internal.h
@@ -225,6 +225,7 @@ enum vfs_track_type {
 #define LL_SBI_USER_XATTR       0x08 /* support user xattr */
 #define LL_SBI_ACL              0x10 /* support ACL */
 #define LL_SBI_JOIN             0x20 /* support JOIN */
+#define LL_SBI_LOCALFLOCK       0x40 /* Local flocks support by kernel */
 
 struct ll_sb_info {
         struct list_head          ll_list;
@@ -484,6 +485,7 @@ int ll_sync_page_range(struct inode *, struct address_space *, loff_t, size_t);
 /* llite/file.c */
 extern struct file_operations ll_file_operations;
 extern struct file_operations ll_file_operations_flock;
+extern struct file_operations ll_file_operations_noflock;
 extern struct inode_operations ll_file_inode_operations;
 extern int ll_inode_revalidate_it(struct dentry *, struct lookup_intent *);
 extern int ll_have_md_lock(struct inode *inode, __u64 bits);
diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c
index 872fafddf0e069941bf5a283df7091b3961bc077..0671d57207f17204c205b783ef4818b43954c1f3 100644
--- a/lustre/llite/llite_lib.c
+++ b/lustre/llite/llite_lib.c
@@ -170,8 +170,10 @@ static int client_common_fill_super(struct super_block *sb,
         
         if (sbi->ll_flags & LL_SBI_FLOCK)
                 sbi->ll_fop = &ll_file_operations_flock;
-        else
+        else if (sbi->ll_flags & LL_SBI_LOCALFLOCK)
                 sbi->ll_fop = &ll_file_operations;
+        else
+                sbi->ll_fop = &ll_file_operations_noflock;
 
         err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid, data);
         if (err == -EBUSY) {
@@ -631,7 +633,12 @@ static int ll_options(char *options, int *flags)
                         *flags |= tmp;
                         goto next;
                 }
-                tmp = ll_set_opt("noflock", s1, LL_SBI_FLOCK);
+                tmp = ll_set_opt("localflock", s1, LL_SBI_LOCALFLOCK);
+                if (tmp) {
+                        *flags |= tmp;
+                        goto next;
+                }
+                tmp = ll_set_opt("noflock", s1, LL_SBI_FLOCK|LL_SBI_LOCALFLOCK);
                 if (tmp) {
                         *flags &= ~tmp;
                         goto next;